Meteorological data acquisition method, system, equipment and medium

By sending preset frequency data collection requests to the meteorological management department, using JSON serialization and restful style to process meteorological data, the problems of difficult and high error rate for meteorological data collection at the new energy power station are solved, and real-time meteorological data is realized. Accurate and secure transmission.

CN118981492APending Publication Date: 2024-11-19BEIJING HUANENG XINRUI CONTROL TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411043833.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The collection of meteorological data at new energy power stations is difficult and has a high error rate, which leads to deviations in meteorological data analysis results, affecting management and maintenance safety.

Method used

The request is sent to the meteorological data interface of the meteorological management department through the preset data acquisition frequency, the data is parsed using JSON serialization, the valid meteorological data is extracted and sent to the local message queue in standard JSON format, and then sent to the API of the transmission program in restful style. Interface, stored in preset storage space.

Benefits of technology

Real-time, safe and stable collection and transmission of meteorological data is realized, reducing the difficulty of collection, ensuring the accuracy and consistency of data, and improving data transmission efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981492A_ABST
    Figure CN118981492A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data acquisition, and discloses a meteorological data acquisition method, system and device and a medium, and the method comprises the steps: transmitting a data acquisition request to a meteorological data interface of a meteorological management department at a preset data acquisition frequency, and obtaining a data request result; analyzing the data request result in a JSON serialization mode to obtain a data analysis result; extracting effective meteorological data from the data analysis result, and sending the extracted effective meteorological data to a local message queue in a standard JSON format; sending the effective meteorological data in the local message queue to an API (Application Program Interface) of a transmission program in a restful style; storing the effective meteorological data received in the API interface of the transmission program to a preset storage space; according to the invention, real-time safe acquisition and stable transmission of the meteorological data are realized, the acquisition difficulty of the meteorological data is greatly reduced, and effective meteorological data support can be provided for the whole new energy power generation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data collection, and in particular relates to a meteorological data collection method, system, equipment and medium. Background Art

[0002] With the development of renewable energy power generation technology, the installed capacity of renewable energy power generation has increased dramatically. Among them, wind power, photovoltaic and other renewable energy power generation are greatly affected by meteorological conditions, and the geographical location of renewable energy power generation sites covers a wide range. Therefore, the collection scope of meteorological data of renewable energy power generation sites and the standardization of data play a vital role in the management or maintenance of renewable energy power generation systems. Among them, real-time and accurate collection of meteorological element data such as wind speed, wind direction, temperature and humidity can provide a data basis for weather forecasts of wind power and photovoltaic power generation sites, thereby helping the sites to achieve lightning, snow and sandstorm protection, predict power curves and predict power generation.

[0003] At present, renewable energy power generation companies usually collect and summarize meteorological data based on meteorological instruments at power stations. With the increasing number of renewable energy power stations, the collection and compilation of meteorological data becomes more difficult and the errors are higher, which in turn causes large deviations in the analysis results of meteorological data, creating great hidden dangers for the management and maintenance of renewable energy power stations. Summary of the invention

[0004] In view of the technical problems existing in the prior art, the present invention provides a meteorological data collection method, system, equipment and medium to solve the technical problems that the existing meteorological data collection for new energy power generation stations is difficult and has a high error rate.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] The present invention provides a meteorological data collection method, comprising:

[0007] Send data collection requests to the meteorological data interface of the meteorological management department at the preset data collection frequency to obtain data request results;

[0008] Parsing the data request result in JSON serialization to obtain a data parsing result;

[0009] Extracting valid meteorological data from the data analysis results, and sending the extracted valid meteorological data to a local message queue in a standard JSON format;

[0010] Send the valid meteorological data in the local message queue to the API interface of the transmission program in a RESTful style;

[0011] The valid meteorological data received in the API interface of the transmission program is stored in the preset storage space.

[0012] Furthermore, the meteorological data interface of the meteorological management department is an API interface of the meteorological management department.

[0013] Further, the process of sending a data collection request to the meteorological data interface of the meteorological management department at a preset data collection frequency and obtaining the data request result is as follows:

[0014] Determine the data collection strategy based on the data volume of the meteorological data collected each time;

[0015] According to the data collection strategy, a data collection request is sent to the meteorological data interface of the meteorological management department; wherein the data collection request is used to trigger the meteorological data interface of the meteorological management department to respond and return data content and scrollId;

[0016] According to the returned scrollId, the meteorological data interface of the meteorological management department is recursively called until the scrollId is 1, completing one data collection;

[0017] The data request result is obtained by obtaining the data content returned by the meteorological data interface of the meteorological management department in a data collection.

[0018] Furthermore, the data request result is parsed in JSON serialization to obtain the data parsing result, as follows:

[0019] Convert the data request result into a JSON string to obtain a request result in the JSON string format;

[0020] The json.loads() function is used to parse the request result in the JSON string format to obtain the data parsing result.

[0021] Furthermore, the effective meteorological data includes weather phenomena, real-time temperature, wind direction, wind speed, wind force level, precipitation, air humidity, visibility, air pressure and road icing signs.

[0022] Furthermore, the process of sending the valid meteorological data in the local message queue to the API interface of the transmission program in a RESTful style is as follows:

[0023] The valid meteorological data in the local message queue is sent to the API interface of the transmission program in a RESTful style according to the preset data consumption level.

[0024] Furthermore, the preset storage space includes a redis cache or a big data platform.

[0025] The present invention also provides a meteorological data collection system, comprising:

[0026] The data request module is used to send a data collection request to the meteorological data interface of the meteorological management department at a preset data collection frequency to obtain a data request result;

[0027] A data parsing module is used to parse the data request result in a JSON serialization manner to obtain a data parsing result;

[0028] An effective data extraction module is used to extract effective meteorological data from the data analysis results, and send the extracted effective meteorological data to a local message queue in a standard JSON format;

[0029] The data transmission module is used to send the valid meteorological data in the local message queue to the API interface of the transmission program in a RESTful style;

[0030] The data storage module is used to store the valid meteorological data received in the API interface of the transmission program into a preset storage space.

[0031] The present invention also provides a meteorological data collection device, comprising:

[0032] Memory for storing computer programs;

[0033] A processor is used to implement the steps of the meteorological data collection method when executing the computer program.

[0034] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, the steps of the meteorological data collection method are implemented.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] The meteorological data collection method provided by the present invention obtains data through the meteorological data interface of the meteorological management department and performs standardized processing and transmission on the data, so as to realize real-time, safe collection and stable transmission of meteorological data, greatly reduce the difficulty of meteorological data collection, and ensure the accuracy of data, and can provide effective meteorological data support for the entire new energy power generation system; specifically, a data collection request is sent to the meteorological data interface of the meteorological management department through a preset data collection frequency, so as to ensure the real-time nature of the collection result of meteorological data; at the same time, there is no need to collect data from the meteorological instrument equipment of the power station, so as to greatly reduce the difficulty of data collection and improve the data collection efficiency; secondly, the data request result is parsed in a JSON serialization manner, so as to realize unified processing of meteorological data in different formats, and improve the readability and maintainability of data; by extracting effective meteorological data and sending it to the local message queue in the standard JSON format, the consistency and predictability of meteorological data are ensured; the local message queue is used as a buffer in the process of data collection and transmission, so as to avoid data loss due to network fluctuations and ensure the integrity of data; the effective meteorological data is sent in a restful style, so as to improve the transmission efficiency and security of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a flow chart of the meteorological data collection method described in Example 1;

[0038] Figure 2 This is a structural block diagram of the meteorological data acquisition system described in Example 2;

[0039] Figure 3 This is a structural block diagram of the meteorological data acquisition device described in Example 3. DETAILED DESCRIPTION

[0040] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail in the following specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0041] Example 1

[0042] As attached Figure 1 As shown, the present invention provides a method for collecting meteorological data, comprising the following steps:

[0043] Step 1: Determine the frequency of meteorological data collection and obtain a preset data collection frequency. Preferably, the preset data collection frequency is to complete the collection of meteorological data once every 10 minutes.

[0044] Step 2: Set a data collection timer task according to the preset data collection frequency. The data collection task is used to trigger the execution of the meteorological data collection program according to the preset meteorological data collection frequency; specifically, the Cron expression is used to set the data collection timer task in the task scheduling system according to the preset data collection frequency.

[0045] Step 3: trigger the data collection timer task, and the data collection program sends a data collection request to the meteorological data interface of the meteorological management department at a preset data collection frequency to obtain a data request result. The meteorological data interface of the meteorological management department is an API interface of the meteorological management department.

[0046] Specifically: according to the data level of the meteorological data collected each time, determine the data collection strategy; according to the data collection strategy, send a data collection request to the meteorological data interface of the meteorological management department; wherein the data collection request is used to trigger the meteorological data interface of the meteorological management department to respond and return data content and scrollId; according to the returned scrollId, implement a recursive call to the meteorological data interface of the meteorological management department until the scrollId is 1, completing one data collection; obtain the data content returned by the meteorological data interface of the meteorological management department in one data collection, that is, obtain the data request result.

[0047] Specifically, the process of obtaining data request results is as follows:

[0048] Step 31: Determine a data collection strategy based on the data level of the meteorological data collected each time.

[0049] Step 32: Determine the URL of the API interface of the meteorological management department according to the data collection strategy.

[0050] Step 33: According to the URL of the API interface of the meteorological management department, use the initial value of scrollId to send a data collection request to the API interface of the meteorological management department.

[0051] Step 34: The API interface of the meteorological management department receives and responds to the data collection request, and returns data content and scrollId.

[0052] Step 35, determine whether scrollId is 1; if scrollId is not equal to 1, use the current value of scrollId to send a data collection request to the API interface of the meteorological management department again, and repeat the operations of steps 34-35.

[0053] Step 36: When scrollId is equal to 1, stop the recursive call and complete one data collection.

[0054] Step 37: Obtain the data content returned by the meteorological data interface of the meteorological management department in a data collection, that is, obtain the data request result.

[0055] Step 4: Parse the data request result in JSON serialization to obtain a data parsing result. Specifically, the steps include:

[0056] Step 41: Convert the data request result into a JSON string to obtain a request result in the JSON string format.

[0057] Step 42: Use the json.loads() function to parse the request result in the JSON string format to obtain the data parsing result.

[0058] Step 5: Extract valid meteorological data from the data analysis results, and send the extracted valid meteorological data to the local message queue in standard JSON format. The valid meteorological data includes weather phenomena, real-time temperature, wind direction, wind speed, wind force level, precipitation, air humidity, visibility, air pressure and road icing signs.

[0059] It should be noted that the process of extracting valid meteorological data from the data parsing results is specifically as follows: by analyzing the JSON data structure of the data parsing results, the position of the valid meteorological data in the JSON is determined; by traversing the JSON object or statement, the key containing the valid meteorological data is obtained; according to the key containing the valid meteorological data, the meteorological data is extracted from the data parsing results to obtain the valid meteorological data.

[0060] Step 6: Send the valid meteorological data in the local message queue to the API interface of the transmission program in a restful style according to the preset data consumption. Preferably, the preset data consumption is 1000 meteorological data each time.

[0061] Step 7: Store the valid meteorological data received in the API interface of the transmission program into a preset storage space; wherein the preset storage space is a redis cache or a big data platform.

[0062] The meteorological data collection method described in the present invention sends a data collection request to the meteorological data interface of the meteorological management department through a preset data collection frequency, thereby ensuring the real-time nature of the meteorological data collection results, and there is no need to collect data from the meteorological instrument equipment at the power station, which greatly reduces the difficulty of data collection and improves the data collection efficiency; the data request results are parsed in a JSON serialization manner to achieve unified processing of meteorological data in different formats, thereby improving the readability and maintainability of the data; the consistency and predictability of the meteorological data are ensured by extracting valid meteorological data and sending it to the local message queue in a standard JSON format; the extracted valid meteorological data is sent to the local message queue in a standard JSON format, thereby achieving the use of the local message queue as a buffer in the process of data collection and transmission, thereby avoiding data loss due to network fluctuations and ensuring the integrity of the data; the valid meteorological data in the local message queue is sent in a restful style, thereby improving the transmission efficiency and security of the data.

[0063] Example 2

[0064] As attached Figure 2 As shown, this embodiment 2 provides a meteorological data collection system, including a collection frequency setting module, a timing task module, a data request module, a data parsing module, a data sending module, a data transmission module and a data storage module; the collection frequency setting module is used to determine the collection frequency of meteorological data and obtain a preset data collection frequency; the timing task module is used to set the data collection timing task according to the preset data collection frequency; the data request module is used to trigger the data collection timing task, and the data collection program sends a data collection request to the meteorological data interface of the meteorological management department at the preset data collection frequency to obtain a data request result; the data parsing module is used to parse the data request result in a JSON serialized manner to obtain a data parsing result; the data sending module is used to extract valid meteorological data from the data parsing result, and send the extracted valid meteorological data to the local message queue in a standard JSON format; the data transmission module is used to send the valid meteorological data in the local message queue to the API interface of the transmission program in a restful style according to the preset data consumption; the data storage module is used to store the valid meteorological data received in the API interface of the transmission program to a preset storage space; wherein the preset storage space is a redis cache or a big data platform.

[0065] Example 3

[0066] As attached Figure 3As shown, this embodiment 3 provides a meteorological data collection device, including: a memory for storing a computer program; a processor for implementing the steps of the meteorological data collection method when executing the computer program.

[0067] When the processor executes the computer program, the steps of the above-mentioned meteorological data collection method are implemented, for example: determining the collection frequency of meteorological data and obtaining a preset data collection frequency; setting a data collection timing task according to the preset data collection frequency; triggering the data collection timing task, the data collection program sends a data collection request to the meteorological data interface of the meteorological management department at the preset data collection frequency, and obtains a data request result; parsing the data request result in JSON serialization to obtain a data parsing result; extracting valid meteorological data from the data parsing result, and sending the extracted valid meteorological data to the local message queue in a standard JSON format; sending the valid meteorological data in the local message queue to the API interface of the transmission program in a restful style according to the preset data consumption; storing the valid meteorological data received in the API interface of the transmission program to a preset storage space; wherein the preset storage space is a redis cache or a big data platform.

[0068] Alternatively, when the processor executes the computer program, it implements the functions of each module in the above-mentioned system, for example: a collection frequency setting module, which is used to determine the collection frequency of meteorological data and obtain a preset data collection frequency; a timing task module, which is used to set a data collection timing task according to the preset data collection frequency; a data request module, which is used to trigger the data collection timing task, and the data collection program sends a data collection request to the meteorological data interface of the meteorological management department at the preset data collection frequency to obtain a data request result; a data parsing module, which is used to parse the data request result in JSON serialization to obtain a data parsing result; a data sending module, which is used to extract valid meteorological data from the data parsing result, and send the extracted valid meteorological data to the local message queue in standard JSON format; a data transmission module, which is used to send the valid meteorological data in the local message queue to the API interface of the transmission program in a restful style according to the preset data consumption; a data storage module, which is used to store the valid meteorological data received in the API interface of the transmission program to a preset storage space; wherein the preset storage space is a redis cache or a big data platform.

[0069] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the meteorological data collection device.

[0070] For example, the computer program can be divided into a collection frequency setting module, a timing task module, a data request module, a data parsing module, a data sending module, a data transmission module and a data storage module, and the specific functions of each module are as follows: a collection frequency setting module, which is used to determine the collection frequency of meteorological data and obtain a preset data collection frequency; a timing task module, which is used to set a data collection timing task according to a preset data collection frequency; a data request module, which is used to trigger the data collection timing task, and the data collection program sends a data collection request to the meteorological data interface of the meteorological management department at a preset data collection frequency to obtain a data request result; a data parsing module, which is used to parse the data request result in a JSON serialized manner to obtain a data parsing result; a data sending module, which is used to extract valid meteorological data from the data parsing result, and send the extracted valid meteorological data to a local message queue in a standard JSON format; a data transmission module, which is used to send the valid meteorological data in the local message queue to the API interface of the transmission program in a restful style according to a preset data consumption; a data storage module, which is used to store the valid meteorological data received in the API interface of the transmission program to a preset storage space; wherein the preset storage space is a redis cache or a big data platform.

[0071] The meteorological data collection device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The meteorological data collection device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above are examples of meteorological data collection devices and do not constitute a limitation on meteorological data collection devices. The meteorological data collection device may include more components than the above, or a combination of certain components, or different components. For example, the meteorological data collection device may also include input and output devices, network access devices, buses, etc.

[0072] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the meteorological data acquisition device, and uses various interfaces and lines to connect various parts of the entire meteorological data acquisition device.

[0073] The memory can be used to store the computer program and / or module, and the processor implements various functions of the meteorological data acquisition device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.

[0074] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0075] Example 4

[0076] This embodiment 4 provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of a meteorological data collection method described in the above embodiment 1 are implemented, which will not be repeated here.

[0077] It should be noted that if the integrated modules of the meteorological data collection system described in the above-mentioned embodiment 2 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0078] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned meteorological data collection method, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned meteorological data collection method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.

[0079] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0080] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.

[0081] The meteorological data collection method described in the present invention sends a data collection request to the meteorological data interface of the meteorological management department through a preset data collection frequency, and parses the data request result in a JSON serialization manner; then, extracts valid meteorological data and sends it to a local message queue in a standard JSON format; finally, sends the valid meteorological data to the API interface of the transmission program in a restful style, and then stores the valid meteorological data received in the API interface of the transmission program into a preset storage space, thereby realizing the safe collection and stable transmission of real-time meteorological data; by setting an effective data collection frequency, accurate and stable meteorological data can be provided, and effective meteorological data support can be provided for the entire new energy power generation system; it should be noted that the present invention uses the HTTPS transmission protocol to ensure the security of collected data transmission, collects the springboot microservice framework development standard, and integrates the logback log framework, the caffice cache cache framework and other components to achieve.

[0082] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.

Claims

1. A meteorological data collection method, characterized in that: include: Send data collection requests to the meteorological data interface of the meteorological management department at the preset data collection frequency to obtain data request results; Parsing the data request result in JSON serialization to obtain a data parsing result; Extracting valid meteorological data from the data analysis results, and sending the extracted valid meteorological data to a local message queue in a standard JSON format; Send the valid meteorological data in the local message queue to the API interface of the transmission program in a RESTful style; The valid meteorological data received in the API interface of the transmission program is stored in the preset storage space.

2. A meteorological data collection method according to claim 1, characterized in that: The meteorological data interface of the meteorological management department is the API interface of the meteorological management department.

3. A meteorological data collection method according to claim 1, characterized in that: The process of sending a data collection request to the meteorological data interface of the meteorological management department at the preset data collection frequency and obtaining the data request result is as follows: Determine the data collection strategy based on the data volume of meteorological data collected each time; According to the data collection strategy, a data collection request is sent to the meteorological data interface of the meteorological management department; wherein the data collection request is used to trigger the meteorological data interface of the meteorological management department to respond and return data content and scrollId; According to the returned scrollId, the meteorological data interface of the meteorological management department is recursively called until the scrollId is 1, completing one data collection; The data request result is obtained by obtaining the data content returned by the meteorological data interface of the meteorological management department in a data collection.

4. A meteorological data collection method according to claim 1, characterized in that: The data request result is parsed in JSON serialization to obtain the data parsing result, as follows: Convert the data request result into a JSON string to obtain a request result in the JSON string format; The json.loads() function is used to parse the request result in the JSON string format to obtain the data parsing result.

5. A meteorological data collection method according to claim 1, characterized in that: The effective meteorological data includes weather phenomena, real-time temperature, wind direction, wind speed, wind force level, precipitation, air humidity, visibility, air pressure and road icing signs.

6. A meteorological data collection method according to claim 1, characterized in that: The process of sending valid meteorological data in the local message queue to the API interface of the transmission program in a RESTful style is as follows: The valid meteorological data in the local message queue is sent to the API interface of the transmission program in a RESTful style according to the preset data consumption level.

7. A meteorological data collection method according to claim 1, characterized in that: The preset storage space includes redis cache or big data platform.

8. A meteorological data collection system, characterized in that: include: The data request module is used to send a data collection request to the meteorological data interface of the meteorological management department at a preset data collection frequency to obtain a data request result; A data parsing module is used to parse the data request result in a JSON serialization manner to obtain a data parsing result; An effective data extraction module is used to extract effective meteorological data from the data analysis results, and send the extracted effective meteorological data to a local message queue in a standard JSON format; The data transmission module is used to send the valid meteorological data in the local message queue to the API interface of the transmission program in a RESTful style; The data storage module is used to store the valid meteorological data received in the API interface of the transmission program into a preset storage space.

9. A meteorological data collection device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the meteorological data collection method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the meteorological data collection method according to any one of claims 1 to 7 are implemented.