Photovoltaic power station data processing method, photovoltaic power station data acquisition method, photovoltaic power station data processing device and photovoltaic power station data acquisition system
By pre-setting data processing strategies and publish/subscribe mode of Kafka cluster, the problem of packet loss and inconsistent format in photovoltaic power station data acquisition is solved, and efficient and universal data processing is achieved, suitable for different types of data collectors.
Patent Information
- Application Number
- CN202411134733.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-13
AI Technical Summary
The existing photovoltaic power station data acquisition technology has packet loss problem when processing a large amount of remote signal and telemetry data, and the data formats collected by different data collectors are different, resulting in complex processing of the unified format and poor versatility and compatibility.
Different data processing strategies are used to set up pre-order, and the processing strategies are determined according to the data format, and the photovoltaic power station data in single-layer and multi-layer nested formats are processed. Data transmission in publish/subscribe message mode is carried out through Kafka cluster to avoid unified format processing. Suitable for different types of data collectors.
It realizes efficient collection and processing of massive photovoltaic power station data, avoids the problem of packet loss in timely data processing, and improves the universality and compatibility of the system.
Smart Images

Figure CN119127873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic power plants, and in particular to a photovoltaic power plant data processing method, collection method, device and system. Background Art
[0002] With the rapid development of the photovoltaic energy industry, the number of photovoltaic power stations is increasing and the scale is expanding. In order to meet the needs of efficient and intelligent monitoring and management, how to monitor and control the operation data collection of photovoltaic power stations in real time and accurately has become an important research topic.
[0003] Photovoltaic power station data collection and monitoring technology came into being under this background. This technology requires the installation of data collection and monitoring equipment. The data collector collects various data of the photovoltaic power station in real time, such as temperature, light intensity, voltage, current, power, etc., and remotely transmits the collected data to the data processing center for analysis and processing. The monitoring equipment can evaluate the operating status and efficiency of the photovoltaic power station by real-time monitoring and analysis of the data, timely discover and solve potential problems, optimize power generation efficiency, and reduce energy consumption and costs.
[0004] At present, since the timeliness of photovoltaic power station data does not need to be too high, the data collector usually uses the fourth generation mobile communication technology (4G) to remotely or wiredly transmit the photovoltaic power station data to the data gateway, and then transmit it to the data processing center. The data collector and the data gateway usually use the traditional 104 communication protocol for communication, and adopt a question-and-answer data transmission mode. However, this data transmission method may cause packet loss when processing a large amount of telesignaling and telemetry data.
[0005] In addition, since the data formats of photovoltaic power station data collected by different data collectors may be different, unified format processing is required at a certain stage in the data collection process. The implementation method is complex and has poor versatility and compatibility. Summary of the invention
[0006] In view of the above problems in the prior art, the object of the present invention is to provide a photovoltaic power station data processing method, collection method, device and system, which can be applicable to different types of data collectors and have good versatility and compatibility.
[0007] In order to solve the above problems, the present invention provides a photovoltaic power station data processing method, which is applied to a business service module in a photovoltaic power station data acquisition system, comprising:
[0008] Acquire photovoltaic power station data to be processed, and determine a data format of the photovoltaic power station data, wherein the data format includes a single-layer data format and a multi-layer nested format;
[0009] Determining a target processing strategy for processing the photovoltaic power station data according to the data format;
[0010] The photovoltaic power station data is processed based on the target processing strategy to obtain and store the processed data.
[0011] Further, the target processing strategy for processing the photovoltaic power station data according to the data format includes:
[0012] If the data format is a single-layer data format, determining the target processing strategy to be a first processing strategy;
[0013] If the data format is a three-layer nested format, determining that the target processing strategy is the second processing strategy;
[0014] If the data format is a four-layer nested format, the target processing strategy is determined to be the third processing strategy.
[0015] Further, the processing of the photovoltaic power station data based on the target processing strategy to obtain and store the processed data includes:
[0016] If the target processing strategy is the second processing strategy, determining the device type corresponding to the photovoltaic power station data;
[0017] Determine a first DTO model table corresponding to the photovoltaic power station data according to the device type;
[0018] Segment and traverse the photovoltaic power station data, obtain first parsed data and fill it into the first DTO model table;
[0019] Update the corresponding real-time data table in the MySQL database based on the first DTO model table;
[0020] The first parsed data is encapsulated into a first Map set, and the first Map set is stored in the InfluxDB time series library.
[0021] Further, the processing of the photovoltaic power station data based on the target processing strategy to obtain and store the processed data includes:
[0022] If the target processing strategy is the third processing strategy, obtaining a second DTO model table corresponding to the photovoltaic power station data;
[0023] Performing hierarchical traversal on the photovoltaic power station data, obtaining second parsed data and filling it into the second DTO model table;
[0024] Update the corresponding real-time data table in the MySQL database based on the second DTO model table;
[0025] The second parsed data is encapsulated as a second Map set, and the second Map set is stored in the InfluxDB time series library.
[0026] Another aspect of the present invention provides a photovoltaic power station data collection method, which is applied to a photovoltaic power station data collection system. The system includes multiple data collectors, a Kafka cluster, and a business service module. The method includes:
[0027] The data collector collects equipment data in the photovoltaic power station and packages the equipment data into photovoltaic power station data in a preset data format, wherein the preset data format includes a single-layer data format and a multi-layer nested format;
[0028] The data collector sends the photovoltaic power station data to the Kafka cluster;
[0029] The Kafka cluster receives and stores the photovoltaic power station data in a target topic corresponding to the photovoltaic power station, where the target topic is a custom Kafka message queue;
[0030] The business service module obtains the photovoltaic power station data in the target subject, and processes the photovoltaic power station data using the photovoltaic power station data processing method as described above.
[0031] Furthermore, the data collector sends the photovoltaic power station data to the Kafka cluster, including:
[0032] The data collector sends the photovoltaic power station data to a third-party server, and the photovoltaic power station data is forwarded to the Kafka cluster through the third-party server.
[0033] Furthermore, the system also includes a configuration center;
[0034] The method further comprises:
[0035] The configuration center configures one or more themes for the photovoltaic power station in response to a user's theme configuration request for the photovoltaic power station, and presents the one or more themes on a Web terminal;
[0036] The third-party server configures corresponding data forwarding rules for each of the topics.
[0037] Furthermore, the business service module obtains the photovoltaic power station data in the target topic, including:
[0038] When new data appears in the target topic, the business service module acquires the photovoltaic power station data in the target topic by calling a Kafka node in the Kafka cluster.
[0039] Another aspect of the present invention provides a photovoltaic power station data processing device, the device is arranged in a business service module of a photovoltaic power station data acquisition system, and the device comprises:
[0040] A format determination module, used to obtain photovoltaic power station data to be processed and determine the data format of the photovoltaic power station data, wherein the data format includes a single-layer data format and a multi-layer nested format;
[0041] A strategy determination module, used to determine a target processing strategy for processing the photovoltaic power station data according to the data format;
[0042] The data processing module is used to process the photovoltaic power station data based on the target processing strategy, and obtain and store the processed data.
[0043] Another aspect of the present invention provides a photovoltaic power station data acquisition system, the system comprising a plurality of data collectors, a Kafka cluster and a business service module;
[0044] The data collector is used to collect device data in the photovoltaic power station, and package the device data into photovoltaic power station data in a preset data format, wherein the preset data format includes a single-layer data format and a multi-layer nested format; and send the photovoltaic power station data to the Kafka cluster;
[0045] The Kafka cluster is used to receive and store the photovoltaic power station data in a target topic corresponding to the photovoltaic power station, where the target topic is a custom Kafka message queue;
[0046] The business service module is used to obtain the photovoltaic power station data in the target subject, and process the photovoltaic power station data using the photovoltaic power station data processing method as described above.
[0047] Another aspect of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the photovoltaic power station data processing method or photovoltaic power station data collection method as described above.
[0048] On the other hand, the present invention provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the photovoltaic power station data processing method or photovoltaic power station data collection method as described above.
[0049] Another aspect of the present invention provides a computer program product, including a computer program / instruction, which implements the photovoltaic power station data processing method or photovoltaic power station data collection method as described above when executed by a processor.
[0050] Due to the above technical solution, the present invention has the following beneficial effects:
[0051] According to the photovoltaic power station data processing method of the embodiment of the present invention, different data processing strategies are pre-set to process photovoltaic power station data in a single-layer data format and a multi-layer nested format respectively. There is no need to process the photovoltaic power station data in a unified format. The implementation method is simple and can be applied to different types of data collectors, with good versatility and compatibility.
[0052] According to the photovoltaic power station data collection method of the embodiment of the present invention, the collected photovoltaic power station data is stored in the Kafka cluster waiting for consumption by using the publish / subscribe message mode, and different data processing strategies are pre-set to process the photovoltaic power station data in a single-layer data format and a multi-layer nested format respectively. There is no need to process the photovoltaic power station data in a unified format. The implementation method is simple, and can efficiently collect and process massive photovoltaic power station data, avoiding the problem of packet loss caused by untimely processing, and can be applied to different types of data collectors, with good versatility and compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present invention;
[0055] Figure 2 is a flow chart of a photovoltaic power station data processing method provided by an embodiment of the present invention;
[0056] Figure 3 is a flow chart of a photovoltaic power station data collection method provided by an embodiment of the present invention;
[0057] Figure 4is a flow chart of a photovoltaic power station data collection method provided by another embodiment of the present invention;
[0058] Figure 5 is a schematic structural diagram of a photovoltaic power station data processing device provided by an embodiment of the present invention;
[0059] Figure 6 It is a structural schematic diagram of a photovoltaic power station data acquisition system provided by an embodiment of the present invention;
[0060] Figure 7 is a block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0063] In order to make the purpose, technical scheme and advantages disclosed in the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail in combination with the accompanying drawings and embodiments. The acquisition, storage, use and processing of data in the technical scheme of the embodiments of the present invention are in compliance with the relevant provisions of national laws and regulations. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention and are not used to limit the embodiments of the present invention.
[0064] Reference Manual Attached Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present invention, such as Figure 1As shown, the implementation environment may include multiple data collectors 110, a third-party server 120, a Kafka cluster 130, a business service module 140, and a database 150. Each of the data collectors 110 and the third-party server 120, the third-party server 120 and the Kafka cluster 130, and the Kafka cluster 130 and the business service module 140 may be directly or indirectly connected via wired or wireless communication, and the embodiment of the present invention does not limit this.
[0065] Each of the data collectors 110 can be connected to one or more devices in the photovoltaic power station for communication, and is used to collect device data of the devices, and package the device data into photovoltaic power station data in a preset data format. The photovoltaic power station may include but is not limited to a green energy distributed photovoltaic power station, and the devices in the photovoltaic power station may include but are not limited to inverters, electric meters, weather stations and other devices, which are not limited in the embodiment of the present invention.
[0066] The third-party server 120 can be used to forward the photovoltaic power station data collected by each of the data collectors 110 to the Kafka cluster 130. The third-party server 120 can include but is not limited to Message Queuing Telemetry Transport (MQTT) middleware services, etc., which are not limited in the embodiment of the present invention.
[0067] The Kafka cluster 130 can be a distributed message queue system that supports partitioning, multiple copies, and multiple subscribers and is coordinated by the zookeeper registry. The Kafka cluster 130 can be composed of multiple Kafka nodes, for example, it can be composed of 3 servers (each server can be a Kafka node). A topic is a logical unit for storing data created in a Kafka cluster. Both the third-party server 120 and the business service module 140 can transmit data with the Kafka cluster 130 through the subscribed Topic.
[0068] The business service module 140 can be used to read all topic random consumptions in each Kafka node in the Kafka cluster 130, and use the photovoltaic power station data processing method provided in the embodiment of the present invention to process the read photovoltaic power station data, and obtain and store the processed data in the database 150. The business service module 140 can be a distributed microservice module, such as a springCloud Listne microservice parsing module, etc., which is not limited in the embodiment of the present invention.
[0069] The database 150 may be used to store data obtained by processing the photovoltaic power station data by the business service module 140. The database 150 may include but is not limited to an InfluxDB time series database and a MySQL database, etc., which is not limited in the embodiment of the present invention.
[0070] In one possible embodiment, Figure 1 As shown, the implementation environment may further include a configuration center 160. The user may configure a corresponding topic for the photovoltaic power station through the configuration center 160, and the third-party server 120 may also configure a corresponding data forwarding rule for each of the topics, so as to store the device data in the photovoltaic power station collected by the data collector 110 into the corresponding topic. The configuration center 160 may include but is not limited to a dynamic naming and configuration service (Dynamic Naming and Configuration Service, Nacos), etc., and the embodiment of the present invention does not limit this.
[0071] In the embodiment of the present invention, in the implementation environment, the Internet of Things technology can be used to construct a photovoltaic power station data collection and analysis solution through the Java language, thereby achieving the purpose of efficiently processing massive data collection and analysis, and improving the versatility and compatibility of the photovoltaic power station data collection system.
[0072] It should be noted that Figure 1 Just an example.
[0073] Reference Manual Attached Figure 2 , which shows a flow chart of a photovoltaic power station data processing method provided by an embodiment of the present invention, which can be applied to Figure 1 In the business service module, the specific Figure 2 As shown, the method may include the following steps:
[0074] S210: Acquire photovoltaic power station data to be processed, and determine a data format of the photovoltaic power station data, where the data format includes a single-layer data format and a multi-layer nested format.
[0075] In an embodiment of the present invention, the equipment data of the equipment in the photovoltaic power station collected and reported by the data collector can be obtained from the topic corresponding to the photovoltaic power station in the Kafka cluster as the photovoltaic power station data to be processed. Specifically, when new data appears in the corresponding topic of the Kafka cluster, a Kafka node in the Kafka cluster can be randomly called, and the Kafka node can send the new data to the business service module in the form of a message body. The business service module can use the new data as the photovoltaic power station data to be processed. Among them, the message body can be of String type.
[0076] In the embodiment of the present invention, the photovoltaic power station may include but is not limited to a green energy distributed photovoltaic power station, and the equipment in the photovoltaic power station may include but is not limited to inverters, electric meters, weather stations and other equipment. In other words, the photovoltaic power station data may include but is not limited to inverter data, electric meter data, weather station data and other telesignaling / telemetry data, which is not limited in the embodiment of the present invention.
[0077] In an embodiment of the present invention, the data format of the photovoltaic power station data may be a single-layer data format or a multi-layer nested format. The photovoltaic power station data in the single-layer data format may be a data packet with a single device as the main body. The photovoltaic power station data in the multi-layer nested format may be a data packet obtained by packaging all device data under a collector or a photovoltaic power station into a whole.
[0078] Exemplarily, the single-layer data format may be a layer of data structure map<key,value> , can be defined as {"collector identification (identification, id)": "xxxxx", "device identification": "xxxx", collection identifier: "xxxx", ... ..., "timestamp (timestamp)": "zzz"}. The multi-layer nested format may include but is not limited to the three-layer nested format map <key,List<map<key,value> >> and four-level nested format map <key,map<key,List<map<key,value> >>> etc. The three-layer nested format can be defined as {“device identification”: [{“timestamp”: “zzz”, “values”: {“collection identification point”: “xxxx”, .........}}]}. The four-layer nested format can be defined as {“data type”: “real-time”, “serial number (sn)”: “xxxxx”, “client id”: “collector id”, “time”: “zzz”, “data”: {“device identification”: [{“id”, “unique identifier”, “field priority”:
[0079] "1 / 2 / 3", "value": "xxxx"}, ....]}}.
[0080] In a possible embodiment, the data format of the photovoltaic power station data can be determined according to the content of the photovoltaic power station data (e.g., an identification field). Since each data format has a corresponding fixed field in the data, the fixed field can be used as an identification field to identify the data format of the photovoltaic power station data. For example, there must be an object field in the photovoltaic power station data in a single-layer data format, there must be a values field in the photovoltaic power station data in a three-layer nested format, and there must be a data field in the photovoltaic power station data in a four-layer nested format. Therefore, after obtaining the photovoltaic power station data to be processed, it can be identified and determined whether the photovoltaic power station data includes an object field, a values field, and a data field. If the object field is included, it can be determined that the photovoltaic power station data is in a single-layer data format, if the values field is included, it can be determined that the photovoltaic power station data is in a three-layer nested format, and if the data field is included, it can be determined that the photovoltaic power station data is in a four-layer nested format.
[0081] It should be noted that the above-mentioned one-layer data structure, three-layer nested format and four-layer nested format are only examples. In practical applications, the data format of the photovoltaic power station data can also be other formats, and the embodiment of the present invention does not make specific restrictions on this.
[0082] S220: Determine a target processing strategy for processing the photovoltaic power station data according to the data format.
[0083] In the embodiment of the present invention, different processing strategies can be pre-set for photovoltaic power station data in different data formats. After the photovoltaic power station data to be processed is acquired, a target processing strategy for processing the photovoltaic power station data can be determined according to the corresponding data format.
[0084] In a possible embodiment, the target processing strategy for processing the photovoltaic power station data according to the data format may include: if the data format is a single-layer data format, determining the target processing strategy to be the first processing strategy; if the data format is a three-layer nested format, determining the target processing strategy to be the second processing strategy; if the data format is a four-layer nested format, determining the target processing strategy to be the third processing strategy. The first processing strategy, the second processing strategy and the third processing strategy may be pre-set according to actual conditions, and the first processing strategy, the second processing strategy and the third processing strategy may be the same or different from each other, and the embodiment of the present invention does not impose specific restrictions on this.
[0085] S230: Processing the photovoltaic power station data based on the target processing strategy to obtain and store the processed data.
[0086] In an embodiment of the present invention, after determining the target processing strategy, the photovoltaic power station data can be directly processed according to the target processing strategy to obtain processed data. The processed data can also be stored in the InfluxDB time series library and the MySQL database. Among them, the MySQL database is used to store relational data, such as real-time data of equipment, equipment model table relationships, etc. The InfluxDB time series library is used to store all point data of the equipment, and the InfluxDB time series table of the corresponding equipment can be constructed according to the equipment type to store all point data of the corresponding equipment.
[0087] In a possible embodiment, when the target processing strategy is the first processing strategy, the photovoltaic power station data can be in a single-layer data format. Since the received message body is of String type, it can be converted into Json format first, and the object attribute flag and timestamp (timestamp) in the Json format message body can be obtained. Among them, the object attribute flag can include a unique identification code of equipment such as an inverter, an electric meter, and a weather station. According to the object attribute flag, the device type corresponding to the photovoltaic power station data can be determined, and the device type can include but is not limited to an inverter, an electric meter, a weather station, etc., that is, it can be determined whether the photovoltaic power station data is inverter data, electric meter data, or weather station data, etc.
[0088] Specifically, after determining the device type according to the object attribute flag, the data transfer object (DTO) entity model corresponding to the device type can be determined, and the Json format message body is converted to the DTO entity object through MapperConverterUtils according to the device type, and the converted data is stored in the InfluxDB time series library, and the corresponding real-time data table in the MySQL database is updated at the same time.
[0089] Specifically, in the process of converting the Json format message body to the DTO entity object, empty data and processing timestamps will be removed. In the process of storing in the InfluxDB time series library, the object attributes of the converted DTO entity object can be assembled into a Map collection object and entered into the InfluxDB time series table corresponding to the current device. In the process of storing in the InfluxDB time series library, it is also possible to first determine whether the InfluxDB time series table corresponding to the current device exists. If not, create the corresponding InfluxDB time series table first, and then store the data. In the process of updating the real-time data table in the MySQL database, it is possible to first determine whether there is data for the current device in the real-time data table. If so, update the data of the current device according to the converted data. If not, add a piece of data for the current device, thereby completing real-time data processing.
[0090] In a possible embodiment, processing the photovoltaic power station data based on the target processing strategy to obtain and store the processed data may include: if the target processing strategy is the second processing strategy, determining the device type corresponding to the photovoltaic power station data; determining the first DTO model table corresponding to the photovoltaic power station data according to the device type; segmenting and traversing the photovoltaic power station data, obtaining the first parsed data and filling it into the first DTO model table; updating the corresponding real-time data table in the MySQL database based on the first DTO model table; encapsulating the first parsed data into a first Map collection, and storing the first Map collection in the InfluxDB time series library.
[0091] Specifically, when the target processing strategy is the second processing strategy, the photovoltaic power station data can be in a three-layer nested format. Since the received message body is of String type, it can be converted into Json format through JSONObject.parseObject(message) first, and the device identification string in the Json format message body header can be obtained. According to the device identification string, the device type corresponding to the photovoltaic power station data can be determined, and the device type can include but is not limited to inverters, electric meters, weather stations, etc., that is, it can be determined whether the photovoltaic power station data is inverter data, electric meter data, or weather station data, etc.
[0092] Specifically, after determining the device type according to the device identification string, the first DTO model table corresponding to the device type can be determined, and the photovoltaic power station data can be segmented and traversed through the Stirng array String[]name="YWT,NBQ".split(","), and the segmented data can be assembled to obtain the first parsed data. Among them, the first parsed data may include all point data of one or more devices corresponding to the collector that collects the photovoltaic power station data. Then, the acquired first parsed data can be converted into a DTO entity object in Json format message body, and the converted data can be entered into the first DTO model table. Finally, the data in the first DTO model table is stored in the InfluxDB time series library, and the corresponding real-time data table in the MySQL database is updated at the same time.
[0093] Specifically, in the process of converting the Json format message body to the DTO entity object, empty data and processing timestamps will be removed. In the process of storing in the InfluxDB time series library, the object attributes of the DTO entity object in the first DTO model table can be assembled into a Map collection object and entered into the InfluxDB time series table corresponding to the current device. In the process of storing in the InfluxDB time series library, it is also possible to first determine whether the InfluxDB time series table corresponding to the current device exists. If not, create the corresponding InfluxDB time series table first, and then store the data. In the process of updating the real-time data table in the MySQL database, it is possible to first determine whether there is data for the current device in the real-time data table. If so, modify the data to the converted data. If not, add a piece of data for the current device, thereby completing real-time data processing.
[0094] The object attributes of the DTO entity object can be preset according to actual needs, and the embodiment of the present invention does not impose specific restrictions on this. For example, for an inverter, the object attributes of its corresponding DTO entity object may include but are not limited to daily power generation, monthly power generation, total power generation, operating time, fault code and other attributes.
[0095] In a possible embodiment, processing the photovoltaic power station data based on the target processing strategy to obtain and store the processed data may include: if the target processing strategy is the third processing strategy, obtaining the second DTO model table corresponding to the photovoltaic power station data; performing a hierarchical traversal on the photovoltaic power station data, obtaining the second parsed data and filling it into the second DTO model table; updating the corresponding real-time data table in the MySQL database based on the second DTO model table; encapsulating the second parsed data into a second Map set, and storing the second Map set in the InfluxDB time series library.
[0096] Specifically, when the target processing strategy is the third processing strategy, the photovoltaic power station data can be in a four-layer nested format. Since the received message body is of String type, it can be converted into Json format first, and the data in the message body can be obtained through message.contains("data"). The second DTO model table corresponding to the photovoltaic power station data can also be obtained. The table content of the second DTO model table can be pre-set according to actual needs, for example, it can include but is not limited to number, table name, column name, table column name, model table subject, etc., and the embodiment of the present invention does not make specific restrictions on this.
[0097] Specifically, the subject of transmitting the photovoltaic power station data can be filled into the model table subject first, and the data data can be filled into the table name. It is also possible to create a hierarchical declaration in the model table structure, and traverse the photovoltaic power station data in layers according to the data hierarchy. When traversing the last layer of data, the parsed data (including the parsed code and the corresponding value data column) is assembled to obtain the second parsed data. Among them, the second parsed data may include all point data of each device in the photovoltaic power station. Then, the acquired second parsed data can be converted from a Json format message body to a DTO entity object, and the converted data can be entered into the second DTO model table. Finally, the data in the second DTO model table is stored in the InfluxDB time series library, and the corresponding real-time data table in the MySQL database is updated at the same time.
[0098] Specifically, in the process of converting the Json format message body to the DTO entity object, empty data and processing timestamps will be removed. In the process of storing in the InfluxDB time series library, the object attributes of the DTO entity object in the second DTO model table can be assembled into a Map collection object and entered into the InfluxDB time series table corresponding to the current device. In the process of storing in the InfluxDB time series library, it is also possible to first determine whether the InfluxDB time series table corresponding to the current device exists. If not, create the corresponding InfluxDB time series table first, and then store the data.
[0099] In actual applications, the InfluxDB time series library performs table storage during data processing. When receiving data, it first obtains the device point data address, removes redundant and invalid address data, and then encapsulates the attributes into a point object as a structure library and table recognizable by InfluxDB. The point object contains table structure address, data time and other information. Finally, the data is stored through the writeApi.writePoint(bucket,org,point) method.
[0100] Among them, the object attributes of the DTO entity object can be pre-set according to actual needs, and the embodiment of the present invention does not impose specific restrictions on this. Exemplarily, for a weather station, the object attributes of its corresponding DTO entity object may include but are not limited to id, project number, ambient humidity / temperature, component temperature, wind speed, wind direction, rainfall, air pressure, direct radiation instantaneous value, scattered radiation instantaneous value, total radiation daily accumulation, total radiation total accumulation, parent device sn, start time, end time and other attributes.
[0101] It can be understood that in the embodiment of the present invention, by encapsulating the attribute data of the device and storing it in the InfluxDB time series library, it is possible to store tens of millions of data with a daily throughput, which is convenient for later real-time query and monitoring of historical data line chart changes and report export.
[0102] Specifically, in the process of updating the real-time data table in the MySQL database, it can be first determined whether the data of the current device exists in the real-time data table. If it exists, the data is modified to the converted data. If it does not exist, a piece of data of the current device is added, thereby completing the real-time data processing. In the process of updating the real-time data table in the MySQL database, the MySQL real-time data table can also be queried according to the data encapsulated in the second DTO model table to determine whether the current model structure exists. If it does not exist, it is skipped and not processed.
[0103] For example, for weather station data, the corresponding point data such as ambient temperature can be parsed, the obtained ambient temperature can be stored in the weather station attributes, and all point data of the weather station can be assembled and stored in the second DTO model table corresponding to the weather station, and the real-time data table corresponding to the weather station in the MySQL database can be updated.
[0104] To sum up, according to the photovoltaic power station data processing method of an embodiment of the present invention, different data processing strategies are pre-set to process photovoltaic power station data in single-layer data format and multi-layer nested format respectively. There is no need to process the photovoltaic power station data in a unified format. The implementation method is simple and can be applied to different types of data collectors, with good versatility and compatibility.
[0105] Reference Manual Attached Figure 3 , which shows the process of a photovoltaic power station data collection method provided by an embodiment of the present invention, which can be applied to Figure 1 In the implementation environment shown in FIG. Figure 3 As shown, the method may include the following steps:
[0106] S310: The data collector collects device data in the photovoltaic power station, and packages the device data into photovoltaic power station data in a preset data format, where the preset data format includes a single-layer data format and a multi-layer nested format.
[0107] In the embodiment of the present invention, there may be multiple data collectors, each of which may collect equipment data in the photovoltaic power station, such as inverter data, electric meter data, weather station data and other telemetering data, and package the collected data into photovoltaic power station data in a preset format. The multiple data collectors may include different types of data collectors, and different types of data collectors may package equipment data into photovoltaic power station data in different data formats, or may package them into photovoltaic power station data in the same data format, and the embodiment of the present invention does not impose any specific restrictions on this.
[0108] Specifically, each of the data collectors can collect device data of one or more devices, and the one or more devices can be devices of the same device type. The preset data format can be pre-configured according to the attribute information of the data collector, and the preset data format can be a single-layer data format or a multi-layer nested format. The relevant content of the single-layer data format and the multi-layer nested format can be referred to Figure 2 The relevant contents in the illustrated embodiments will not be described in detail in the embodiments of the present invention.
[0109] S320: The data collector sends the photovoltaic power station data to the Kafka cluster.
[0110] In the embodiment of the present invention, the data collector may send the packaged photovoltaic power station data to the Kafka cluster to store the photovoltaic power station data in the topic corresponding to the photovoltaic power station.
[0111] In a possible embodiment, in conjunction with the reference specification, Figure 4 , the data collector sends the photovoltaic power station data to the Kafka cluster, which may include:
[0112] S321: The data collector sends the photovoltaic power station data to a third-party service end.
[0113] S322: The third-party server forwards the photovoltaic power station data to the Kafka cluster.
[0114] In an embodiment of the present invention, the data collector can forward the photovoltaic power station data to the Kafka cluster through a third-party server. For example, based on the MQTT message subscription service, a publish / subscribe message mode can be used to provide one-to-many message publishing to decouple applications. In other words, the third-party server can include but is not limited to the MQTT middleware service. The data collector can send the photovoltaic power station data to the MQTT middleware service, and the MQTT middleware service pushes the photovoltaic power station data to the Kafka cluster.
[0115] Specifically, the data collector can package the collected device data into an MQTT data packet of a preset size, and send it to the MQTT middleware service based on a preset frequency using the MQTT protocol. The data format of the MQTT data packet can be a Json format, and the preset size and the preset frequency can be configured according to actual needs. For example, the preset size can be set to a maximum length of 256mb, and the preset frequency can be set to once every 5 minutes. The embodiment of the present invention does not impose specific restrictions on this.
[0116] Specifically, the MQTT middleware service can forward the received data to the Kafka cluster. The MQTT middleware service can pre-configure one or more corresponding topics for each photovoltaic power station, and each topic can be bound to one or more data collectors to store the data sent by the data collector. The corresponding topic in the MQTT middleware service can receive the photovoltaic power station data sent by all data collectors bound to the topic, and push the received data to the Kafka cluster through the Nat dedicated gateway.
[0117] In a possible embodiment, after receiving the photovoltaic power station data sent by the data collector, the MQTT middleware service can also perform Sql rule processing on part of the data, and push the processed data to the Kafka cluster through the Nat dedicated gateway. Among them, the Sql rule processing can include but is not limited to data format conversion processing. For example, when the data format of the photovoltaic power station data is other than the preset data format, the MQTT middleware service can perform Sql rule processing on the photovoltaic power station data to convert it into the preset data format.
[0118] It can be understood that the embodiments of the present invention provide one-to-many message publishing by using a publish / subscribe message model based on an MQTT message subscription service, which can decouple applications and avoid packet loss caused by untimely data processing.
[0119] S330: The Kafka cluster receives and stores the photovoltaic power station data in a target topic corresponding to the photovoltaic power station, where the target topic is a custom Kafka message queue.
[0120] In the embodiment of the present invention, the Kafka cluster may pre-configure one or more topics (i.e., Kafka message queues) corresponding to each photovoltaic power station, and then the photovoltaic power station data may be stored in the corresponding topics. For example, the corresponding topics may be pre-configured according to the data capacity of the photovoltaic power station, and after the Kafka cluster receives the photovoltaic power station data, a target topic may be determined from the topics corresponding to the photovoltaic power station, and the photovoltaic power station data may be stored in the target topic.
[0121] Specifically, the Kafka cluster can be composed of multiple Kafka nodes, for example, it can be composed of 3 servers (each server can be a Kafka node), and live on the zookeeper registration machine to schedule each other, and the data in each Kafka node can be automatically synchronized. The MQTT middleware service can push the photovoltaic power station data to one of the Kafka nodes through the Nat dedicated gateway. Since the data in each Kafka node can be automatically synchronized, the photovoltaic power station data will be stored in each Kafka node.
[0122] In an embodiment of the present invention, the theme corresponding to the photovoltaic power station can be customized by the user. For example, when it is necessary to collect equipment data of a new photovoltaic power station, the user can configure one or more themes for the new photovoltaic power station according to actual needs to store the photovoltaic power station data corresponding to the new photovoltaic power station.
[0123] In a possible embodiment, the method may also include: the configuration center configures one or more themes for the photovoltaic power station in response to a user's request for theme configuration for the photovoltaic power station, and presents the one or more themes on a web page (Web); the third-party server configures corresponding data forwarding rules for each of the themes.
[0124] Specifically, the configuration center can display a configuration interface, and the user can customize the information of one or more topics corresponding to the photovoltaic power station based on the configuration interface, and issue a topic configuration request. After receiving the topic configuration request, the configuration center can configure one or more topics for the photovoltaic power station based on the information of the one or more topics. The configuration center can also present the one or more topics on the Web end, and the user can view the customized topics on the Web end.
[0125] Specifically, after the configuration center completes configuring the topics, the third-party server can also configure corresponding data forwarding rules for each of the topics, that is, the rules for forwarding the photovoltaic power station data of the corresponding photovoltaic power station into these topics. After receiving the photovoltaic power station data of the photovoltaic power station, the third-party server can forward it to the corresponding topic for storage according to the configured data forwarding rules, thereby realizing data distribution (that is, service start and stop only affect data consumption, not data storage).
[0126] It can be understood that in the embodiment of the present invention, by sending the collected photovoltaic power station data to the topic corresponding to the photovoltaic power station and queuing it for storage and waiting for consumption, efficient collection and processing of massive data can be achieved.
[0127] S340: The business service module obtains the photovoltaic power station data in the target topic, and processes the photovoltaic power station data using the photovoltaic power station data processing method.
[0128] In the embodiment of the present invention, the business service module can subscribe to and consume the photovoltaic power station data from the Kafka cluster, and adopt Figure 2 The photovoltaic power station data processing method shown is used to process the photovoltaic power station data to store the photovoltaic power station data in the InfluxDB time series library and the MySQL database.
[0129] In a possible embodiment, the business service module obtains the photovoltaic power station data in the target topic, which may include: when new data appears in the target topic, the business service module obtains the photovoltaic power station data in the target topic by calling a Kafka node in the Kafka cluster.
[0130] Specifically, in conjunction with the reference manual Figure 4 , the step S340 may include:
[0131] S341: The business service module monitors the Kafka cluster.
[0132] S342: When new data is detected in the target topic, the business service module calls a Kafka node in the Kafka cluster.
[0133] S343: The Kafka node in the Kafka cluster sends the photovoltaic power station data in the target topic to the business service module.
[0134] S344: The business service module processes the photovoltaic power station data using the photovoltaic power station data processing method.
[0135] Specifically, the business service module can monitor the Kafka cluster in real time. When new data appears in the target topic, it can randomly call a Kafka node in the Kafka cluster to obtain the photovoltaic power station data from the target topic. Figure 2 The photovoltaic power station data processing method provided in the embodiment shown processes the photovoltaic power station data. The specific processing method can refer to Figure 2 The relevant contents in the illustrated embodiments will not be described in detail in the embodiments of the present invention.
[0136] In actual applications, the business service module can monitor consumption Kafka rules, create a ConsumerFactory message factory, and set it for batch consumption. The number of each batch can be pre-set in the Kafka configuration parameters, for example, it can be set to 10, and the embodiment of the present invention does not impose specific restrictions on this. The business service module can obtain all topics contained in the configuration file of the configuration center for group traversal, batch obtain photovoltaic power station data in the topic, convert the obtained photovoltaic power station data into objects, and call the corresponding target processing strategy for data processing to complete the data closed loop.
[0137] For example, the business service module can obtain all topics contained in the configuration file of the configuration center for group traversal, obtain the photovoltaic power station data in the single-layer data format in the topic, and convert it into a String type. The business service module can use the first processing strategy to process and store the photovoltaic power station data, and submit an offset to ensure that the data will be processed.
[0138] For another example, the business service module can obtain all topics contained in the configuration file of the configuration center for group traversal, and obtain the photovoltaic power station data in the multi-layer nested format in the topic as an object type. The business service module can use the second processing strategy or the third processing strategy to process and store the photovoltaic power station data, and submit an offset to ensure that the data will be processed.
[0139] In a specific embodiment, the business service module may be a distributed microservice module, such as a springCloud Listne microservice parsing module, and the configuration center may be Nacos, which is used to discover, configure and manage the springCloud Listne microservice parsing module. The springCloud Listne microservice parsing module can consume all topics in the three Kafka nodes of the Kafka cluster in the configuration file of Nacos to complete the data closed loop.
[0140] In some examples, the data collector can send one piece of data from all connected devices to the MQTT middleware service, and the MQTT middleware service forwards the data to the Kafka cluster and stores it in the corresponding topic. The springCloud Listne microservice parsing module can consume the data in the topic of the Kafka cluster in turn. At this time, the springCloud Listne microservice parsing module can determine that the data format of the data is a single-layer data format, and use the first processing strategy to map a piece of data<k,v> Match the corresponding template analysis and store it in the InfluxDB time series library and MySQL database. Among them, the MySQL database can establish a ledger between photovoltaic power station equipment, build a real-time data table and equipment data table for the corresponding photovoltaic power station, call the xxx-Jbx timer tasker, obtain the latest data of equipment attributes from the parsed data for synchronization, and build the corresponding daily data, thereby completing the closed loop of the data link.
[0141] In some examples, the data collector can package the data of all connected devices into one piece of data and send it to the MQTT middleware service. The MQTT middleware service forwards the data to the Kafka cluster and stores it in the corresponding topic. The springCloud Listne microservice parsing module can consume the data in the topic of the Kafka cluster in turn. At this time, the springCloud Listne microservice parsing module can determine that the data format of the data is a three-layer nested format, and use the second processing strategy to map a piece of data<k,LIst> The device identification string is matched with the corresponding template for parsing and stored in the InfluxDB time series library and MySQL database.
[0142] It can be understood that in the embodiment of the present invention, by using multiple Kafka nodes to form a Kafka cluster and randomly calling a Kafka node in the Kafka cluster to call the corresponding topic consumption data, the purpose of cluster load can be achieved. By using a distributed microservice module, the data processing capability of the system can be improved, thereby effectively improving the system's massive data collection and processing capabilities.
[0143] It should be noted that other contents of each step in the embodiment of the present invention can be referred to Figure 2 The relevant contents in the illustrated embodiments will not be described in detail in the embodiments of the present invention.
[0144] In summary, according to the photovoltaic power station data collection method of an embodiment of the present invention, by using the publish / subscribe message mode, the collected photovoltaic power station data is stored in the Kafka cluster waiting for consumption, and by pre-setting different data processing strategies, single-layer data format and multi-layer nested format photovoltaic power station data are processed respectively. There is no need to process the photovoltaic power station data in a unified format. The implementation method is simple, can efficiently collect and process massive photovoltaic power station data, avoid the problem of packet loss due to untimely processing, and can be applied to different types of data collectors, with good versatility and compatibility.
[0145] Reference Manual Attached Figure 5 , which shows the structure of a photovoltaic power station data processing device 500 provided by an embodiment of the present invention, and the device 500 can be set in a business service module of a photovoltaic power station data acquisition system. Figure 5 As shown, the apparatus 500 may include:
[0146] The format determination module 510 is used to obtain the photovoltaic power station data to be processed and determine the data format of the photovoltaic power station data, wherein the data format includes a single-layer data format and a multi-layer nested format;
[0147] A strategy determination module 520, configured to determine a target processing strategy for processing the photovoltaic power station data according to the data format;
[0148] The data processing module 530 is used to process the photovoltaic power station data based on the target processing strategy, and obtain and store the processed data.
[0149] Reference Manual Attached Figure 6 , which shows the structure of a photovoltaic power station data acquisition system 600 provided by an embodiment of the present invention. Figure 6 As shown, the system 600 may include multiple data collectors 610, a Kafka cluster 620, and a business service module 630;
[0150] The data collector 610 is used to collect device data in the photovoltaic power station, and package the device data into photovoltaic power station data in a preset data format, wherein the preset data format includes a single-layer data format and a multi-layer nested format; and send the photovoltaic power station data to the Kafka cluster;
[0151] The Kafka cluster 620 is used to receive and store the photovoltaic power station data in a target topic corresponding to the photovoltaic power station, where the target topic is a custom Kafka message queue;
[0152] The business service module 630 is used to obtain the photovoltaic power station data in the target subject, and process the photovoltaic power station data using the photovoltaic power station data processing method as described above.
[0153] In a possible embodiment, the system 600 may further include a configuration center; the configuration center is used to respond to a user's theme configuration request for the photovoltaic power station, configure one or more target themes for the photovoltaic power station, and present the one or more target themes on the Web.
[0154] In a possible embodiment, the system 600 may further include a third-party server;
[0155] The data collector 610 is specifically used to send the photovoltaic power station data to the third-party server, and forward the photovoltaic power station data to the Kafka cluster 620 through the third-party server; the third-party server is also used to configure corresponding data forwarding rules for each target topic.
[0156] It should be noted that the device provided in the above embodiment, when implementing its functions, only uses the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the corresponding method embodiment belong to the same concept, and the specific implementation process is detailed in the corresponding method embodiment, which will not be repeated here.
[0157] An embodiment of the present invention also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a photovoltaic power station data processing method or a photovoltaic power station data collection method provided in the above method embodiment.
[0158] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0159] In conjunction with the reference manual Figure 7 , which is a block diagram of an electronic device 700 according to an embodiment of the present invention. The electronic device 700 may include one or more processors 702, a system control logic 708 connected to at least one of the processors 702, a system memory 704 connected to the system control logic 708, a non-volatile memory (NVM) 706 connected to the system control logic 708, and a network interface 710 connected to the system control logic 708.
[0160] The processor 702 may include one or more single-core or multi-core processors. The processor 702 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In the embodiments of the present invention, the processor 702 may be configured to execute the following operations: Figures 2 to 4 One or more of the various embodiments shown.
[0161] In some embodiments, system control logic 708 may include any suitable interface controller to provide any suitable interface to at least one of processors 702 and / or any suitable device or component in communication with system control logic 708 .
[0162] In some embodiments, the system control logic 708 may include one or more memory controllers to provide an interface to the system memory 704. The system memory 704 may be used to load and store data and / or instructions. In some embodiments, the memory 704 of the device 700 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).
[0163] NVM / memory 706 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / memory 706 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD) drive, and a digital versatile disc (DVD) drive.
[0164] NVM / storage 706 may include a portion of storage resources installed on a device of apparatus 700, or it may be accessible to the apparatus but not necessarily a part of the apparatus. For example, NVM / storage 706 may be accessed over a network via network interface 710.
[0165] In particular, system memory 704 and NVM / storage 706 may include, respectively, a temporary copy and a permanent copy of instructions 720. Instructions 720 may include instructions that, when executed by at least one of processors 702, cause device 700 to perform the following operations: Figure 2 The photovoltaic power station data processing method shown or Figure 3 and Figure 4 Instructions of the photovoltaic power plant data collection method shown. In some embodiments, the instructions 720 , hardware, firmware and / or software components thereof may be additionally / alternatively placed in the system control logic 708 , the network interface 710 and / or the processor 702 .
[0166] The network interface 710 may include a transceiver for providing a radio interface for the device 700 to communicate with any other suitable device (such as a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 710 may be integrated with other components of the device 700. For example, the network interface 710 may be integrated with at least one of a communication module of the processor 702, a system memory 704, an NVM / storage 706, and a firmware device (not shown) having instructions. When at least one of the processors 702 executes the instructions, the device 700 implements Figures 2 to 4 One or more of the various embodiments shown.
[0167] The network interface 710 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 710 may be a network adapter, a wireless network adapter, a telephone modem and / or a wireless modem.
[0168] In one embodiment, at least one of the processors 702 may be packaged together with logic for one or more controllers of the system control logic 708 to form a system in package (SiP). In one embodiment, at least one of the processors 702 may be integrated on the same die with logic for one or more controllers of the system control logic 708 to form a system on a chip (SoC).
[0169] The device 700 may further include an input / output (I / O) device 712. The I / O device 712 may include a user interface to enable a user to interact with the device 700; the design of the peripheral component interface enables the peripheral components to interact with the device 700. In some embodiments, the device 700 further includes a sensor for determining at least one of an environmental condition and location information related to the device 700.
[0170] In some embodiments, the user interface may include, but is not limited to, a display (e.g., an LCD display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.
[0171] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0172] In some embodiments, the sensors may include, but are not limited to, gyroscope sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of or interact with the network interface 710 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).
[0173] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 700. In other embodiments of the present invention, the electronic device 700 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0174] An embodiment of the present invention also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a photovoltaic power station data processing method or a photovoltaic power station data collection method. The at least one instruction or the at least one program is loaded and executed by the processor to implement the photovoltaic power station data processing method or the photovoltaic power station data collection method provided in the above method embodiment.
[0175] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0176] One embodiment of the present invention also provides a computer program product, which includes a computer program / instructions. When the computer program product runs on an electronic device, the computer program / instructions are loaded and executed by a processor to implement the steps of the photovoltaic power station data processing method or the photovoltaic power station data collection method provided in the above-mentioned various optional embodiments.
[0177] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0178] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, 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.
[0179] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0180] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A photovoltaic power station data processing method, applied to a business service module in a photovoltaic power station data acquisition system, characterized in that: The method comprises: Acquire photovoltaic power station data to be processed, and determine a data format of the photovoltaic power station data, wherein the data format includes a single-layer data format and a multi-layer nested format; Determining a target processing strategy for processing the photovoltaic power station data according to the data format; The photovoltaic power station data is processed based on the target processing strategy to obtain and store the processed data.
2. The method according to claim 1, characterized in that The step of determining a target processing strategy for processing the photovoltaic power station data according to the data format includes: If the data format is a single-layer data format, determining the target processing strategy to be a first processing strategy; If the data format is a three-layer nested format, determining that the target processing strategy is the second processing strategy; If the data format is a four-layer nested format, the target processing strategy is determined to be the third processing strategy.
3. The method according to claim 2, characterized in that The step of processing the photovoltaic power station data based on the target processing strategy to obtain and store the processed data includes: If the target processing strategy is the second processing strategy, determining the device type corresponding to the photovoltaic power station data; Determine a first DTO model table corresponding to the photovoltaic power station data according to the device type; Segment and traverse the photovoltaic power station data, obtain first parsed data and fill it into the first DTO model table; Update the corresponding real-time data table in the MySQL database based on the first DTO model table; The first parsed data is encapsulated into a first Map set, and the first Map set is stored in the InfluxDB time series library.
4. The method according to claim 2, characterized in that: The step of processing the photovoltaic power station data based on the target processing strategy to obtain and store the processed data includes: If the target processing strategy is the third processing strategy, obtaining a second DTO model table corresponding to the photovoltaic power station data; Performing hierarchical traversal on the photovoltaic power station data, obtaining second parsed data and filling it into the second DTO model table; Update the corresponding real-time data table in the MySQL database based on the second DTO model table; The second parsed data is encapsulated as a second Map set, and the second Map set is stored in the InfluxDB time series library.
5. A photovoltaic power station data collection method, characterized in that: Applied to a photovoltaic power station data acquisition system, the system includes multiple data collectors, a Kafka cluster and a business service module, and the method includes: The data collector collects equipment data in the photovoltaic power station and packages the equipment data into photovoltaic power station data in a preset data format, wherein the preset data format includes a single-layer data format and a multi-layer nested format; The data collector sends the photovoltaic power station data to the Kafka cluster; The Kafka cluster receives and stores the photovoltaic power station data in a target topic corresponding to the photovoltaic power station, where the target topic is a custom Kafka message queue; The business service module obtains the photovoltaic power station data in the target topic, and processes the photovoltaic power station data using the method according to any one of claims 1 to 4.
6. The method according to claim 5, characterized in that The data collector sends the photovoltaic power station data to the Kafka cluster, including: The data collector sends the photovoltaic power station data to a third-party server, and the photovoltaic power station data is forwarded to the Kafka cluster through the third-party server.
7. The method according to claim 6, characterized in that The system also includes a configuration center; The method further comprises: The configuration center configures one or more themes for the photovoltaic power station in response to a user's theme configuration request for the photovoltaic power station, and presents the one or more themes on a Web terminal; The third-party server configures corresponding data forwarding rules for each of the topics.
8. The method according to claim 5, characterized in that The business service module obtains the photovoltaic power station data in the target topic, including: When new data appears in the target topic, the business service module acquires the photovoltaic power station data in the target topic by calling a Kafka node in the Kafka cluster.
9. A photovoltaic power station data processing device, characterized in that: The device is arranged in a business service module of a photovoltaic power station data acquisition system, and the device comprises: A format determination module, used to obtain photovoltaic power station data to be processed and determine the data format of the photovoltaic power station data, wherein the data format includes a single-layer data format and a multi-layer nested format; A strategy determination module, used to determine a target processing strategy for processing the photovoltaic power station data according to the data format; The data processing module is used to process the photovoltaic power station data based on the target processing strategy, and obtain and store the processed data.
10. A photovoltaic power station data acquisition system, characterized in that: The system includes multiple data collectors, Kafka clusters and business service modules; The data collector is used to collect device data in the photovoltaic power station, and package the device data into photovoltaic power station data in a preset data format, wherein the preset data format includes a single-layer data format and a multi-layer nested format; and send the photovoltaic power station data to the Kafka cluster; The Kafka cluster is used to receive and store the photovoltaic power station data in a target topic corresponding to the photovoltaic power station, where the target topic is a custom Kafka message queue; The business service module is used to obtain the photovoltaic power station data in the target subject, and process the photovoltaic power station data using the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Efficient structured library falling method for external data
CN115757590A
Industrial data multi-layer nested protocol analysis method and analysis system
CN115914436A
