Meteorological anomaly visual analysis method based on big data
Through the visual analysis method of meteorological anomalies based on big data, the problem of low efficiency of meteorological data storage and calculation in traditional technology is solved, efficient data analysis and prediction is achieved, and the safety of life and property is guaranteed.
Patent Information
- Application Number
- CN202410760231.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-20
AI Technical Summary
Traditional technology has inefficiencies in the storage and calculation of meteorological data, especially when querying large amounts of data, which is slow and unable to effectively prevent and predict extreme weather, leading to economic and life losses.
Adopting a meteorological anomaly visual analysis method based on big data, crawling meteorological data through Python, using SparkCore and SparkSql for data analysis and processing, combined with sub-database, sub-table and dimensional model design, using Vue, Threamleaf, js, css, and echarts for visualization Display, realize efficient storage and query of data.
It improves the accuracy and timeliness of meteorological data analysis, enhances forecasting capabilities, and ensures the safety of people's lives and property.
Smart Images

Figure CN118673197A
Abstract
Description
Technical Field
[0001] The present invention relates to a meteorological anomaly visualization analysis method, and in particular to a meteorological anomaly visualization analysis method based on big data. Technical Background
[0002] Among the nine types of natural disasters, meteorological disasters are one of the most harmful, causing immeasurable economic losses to people every year.
[0003] Foreign scholars mainly use association rule methods, Bayesian network methods, cluster analysis, rough set methods and spatial data analysis to conduct applied research on meteorological data. For example, Hinke TH et al. considered the correlation between meteorological data in different regions and proposed vectors composed of spatial data. The correlation between vector data was used to express the relationship between meteorological data in different locations. Tadesse T et al. used a dual time series analysis method to find the relationship between ocean parameters and drought factors. They obtained factors with a strong impact on drought from a large number of atmospheric and ocean factors. Bilgin TT et al. clustered the daily temperature data of meteorological stations in Turkey and obtained temperature areas with the same trend, thereby dividing the meteorological regions according to the temperature characteristics of Turkey.
[0004] From the perspective of the development of big data at home and abroad, foreign countries started big data earlier, while China started a little later. Among them, big data technology started more abroad, but there are not many applications of big data technology in meteorology, and more traditional technology applications are used. However, traditional applications have many shortcomings. For example, in terms of data storage and calculation, due to the rapid growth of meteorological data, traditional relational data storage is not competent. Especially when the data volume is large, traditional relational databases are not very good at querying, and interactive SQL queries become very slow. Another problem is the speed of calculation. The more mainstream idea of calculating massive data is to use a distributed memory computing framework. For example, spark or flink.
[0005] A data science and big data technology field, using python to crawl meteorological data from the meteorological science professional knowledge service system, calling json and csv modules to process the crawled data, using SparkCore and SparkSql technology to analyze the data, and then analyze and calculate according to the business theme, finally get the result data, and then store the result data in relational data, then build a Web site through SpringBoot, MyBaties and other technologies, and combine the ApacheEchart visualization framework to visualize the analysis results. Among them, the trend prediction mainly uses the linear regression algorithm. Finally, scientific results can be obtained based on massive data analysis and calculation.
[0006] With the development and progress of the times, various extreme weather events have occurred frequently, causing considerable losses to people's lives and property. The current prevention mechanism uses traditional prevention methods, which have the problem of untimely and inaccurate predictions, leading to waste of property and resources. Due to the above problems, this project attempts to apply big data technology to meteorological data analysis and calculation. After technical analysis and preview, it has achieved good results in processing big data. Summary of the invention
[0007] The purpose of the present invention is to propose a visual analysis method of meteorological anomalies based on big data. The method adopts Python's class library requests, crawls data in xml format from the meteorological science professional knowledge service system by calling the crawler API, and then calls the json and csv modules to parse the crawled data, and stores it in csv format to the local system. According to the subject and index of the analysis, the required data is divided into libraries and tables, an ER relationship diagram is established, the relationship between the tables is clearly displayed, and the database is hierarchically constructed and combined with the dimensional model design. The data analysis and calculation mainly utilizes the technology of SparkCore and SparkSql, and then analyzes and calculates according to the business subject, and finally obtains the result data, and then stores the result data in relational data, which is convenient for the next step of visualization display. Compared with traditional data storage and data query analysis, the use of big data technology is efficient, accurate and scientific, which can enable the system to clean out duplicate data and useless data, thereby improving the accuracy of meteorological analysis and prediction, and finally achieving the purpose of making people's production and life more convenient.
[0008] The present invention adopts the following technical solutions: A meteorological anomaly visualization analysis method based on big data, the method crawls the required information on the website in real time, and makes the crawled data timely and authentic, specifically comprising the following steps: 1) Initialization conditions, set the initial URL; 2) Use the simulated client of requests to make requests and extract information from the web page; 3) Use the xpath tool to extract the html page content and parse and store the collected data; 4) Splice the next URL and determine whether it is effective after the splicing is completed; 5) If the conditions are met, return to the step of crawling the page, and then start the loop until all the crawling steps are completed; in this way, you can get the information data that was not available before, and store the results locally.
[0009] The described meteorological anomaly visualization analysis method based on big data, the data is stored locally, and data cleaning is to use Spark-Core technology to read the original data from the CSV file, and then process and transfer the data through null value judgment, deduplication, regularization test and format conversion, and finally process it into standard structured data, reducing the subsequent program running volume and improving the program running speed to a certain extent.
[0010] The described method for visual analysis of meteorological anomalies based on big data, the described Spark-Core technology uses Hadoop as a large database, a distributed component HDFS, for secure backup of multiple files, which guarantees the security of the program to a certain extent and facilitates subsequent data query. According to the subject and index of the analysis, the required data is divided into libraries and tables, an ER relationship diagram is established, the relationship between the tables is clearly displayed, and the database is hierarchically constructed in combination with dimensional model design; data analysis and calculation module: it uses Spark-Core and SparkSql technology, and then analyzes and calculates according to the business subject, and finally obtains the result data, and then stores the result data in relational data, which is convenient for the next step of visualization display.
[0011] The described method for visualizing meteorological anomalies based on big data, the described database front-end and back-end design, which utilizes Vue, Thremleaf, js, css, echarts, and html, displays the results in the form of charts, which is clearer; the back-end technology is SpringBoot, Mybaties, and SQL technology, which can interact with the data to realize the functions of adding, deleting, modifying, and checking the data.
[0012] The method for visualizing and analyzing meteorological anomalies based on big data, wherein the data addition, deletion, modification and query are implemented to optimize the program, and a training from crawling to data analysis to visualization is set up. After the application training is completed, whether the operation of the program is reasonable is checked, and the analysis results are analyzed to check the scientificity and reliability of the operation results.
[0013] The described method for visualizing and analyzing meteorological anomalies based on big data checks whether the operation of the program is reasonable, the program training is completed and tested, and the meteorological data analysis and visualization system uses Python to extract meteorological data from the meteorological website. The system will process all the data and leave reliable data, such as obvious changes in temperature and wind speed change data, and transmit the data to a relative database for subsequent data analysis; then the analyzed data is summarized and presented on our visualization page, and protection is carried out according to the presented results to ensure the safety of people's lives and property.
[0014] The present invention has the following beneficial effects: The present invention adopts a method based on big data analysis and visualization, and adds intelligent analysis to the meteorological analysis system. By crawling and analyzing a large amount of meteorological data, it is possible to obtain in real time what data changes occur when abnormal weather occurs. Compared with traditional meteorological prediction algorithms, it has extremely strong scientificity and timeliness, because the more data, the more scientific the results can be. By transmitting actual meteorological data to the meteorological data analysis module, it is possible to decide whether the meteorological changes that will occur are sunny or rainy. In addition, the algorithm can be self-learned by the machine, analyze itself, and integrate scientific data such as terrain, altitude, longitude and latitude, and continuously improve the intelligence of the program. Spark and Flume algorithms are added to the big data algorithm, the original algorithm is optimized, the amount of data that can be run is increased, the running speed of the program is guaranteed, and it is helpful to the meteorological system to protect the safety of people's lives and property. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is the overall system block diagram of the model; Figure 2 It is the system framework flow chart; Figure 3 It is a data crawling flow chart; Figure 4 It is to analyze and store the business process diagram; Figure 5 It is a user login flow chart; Figure 6 It is a schematic diagram of distributed computing; Figure 7 It is a database ER diagram; Figure 8 It is the user login interface; Fig. 9 It is an overview statistic. DETAILED DESCRIPTION
[0016] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
[0017] The present invention provides a meteorological anomaly visualization analysis method based on big data, the method comprising the following steps: 1. Call the crawler API to crawl data in XML format from the meteorological science professional knowledge service system, then call the json and csv modules to parse the crawled data and store it in csv format to the local system; 2. Use Spark-Core technology to read the original data from the CSV file, and then process and transfer the data through null value judgment, deduplication, regularization test and format conversion, and finally process it into standard structured data; 3. According to the analysis theme and indicators, the required data is divided into libraries and tables, and an ER relationship diagram is established to clearly display the relationship between tables. The database is layered and combined with dimensional model design; 4. Use SparkCore and SparkSql technologies, perform analysis and calculation based on business topics, and finally obtain result data, which is then stored in relational data for visualization in the next step; 5. The front end of the website platform mainly uses the learned Vue, Thremleaf, js, css, html, etc. The main function is to display the results in the form of charts, which is clearer; 6. The backend technologies of the website are mainly SpringBoot, MyBaties, SQL and other technologies, which can interact with data to realize the functions of adding, deleting, modifying and checking data. The website is built based on SpringBoot, MyBaties and other technologies, and the analysis results are visualized in combination with the ApacheEchart visualization framework.
[0018] The specific implementation steps of step 1 are: Initial start condition, then set the initial url; Use the simulated client of requests to make requests and then extract the information of the web page. We use the xpath tool to extract the content of the HTML page and then parse and store the collected data. The next URL is spliced, and after the splicing is completed, it is determined whether it is effective. If the conditions are met, we return to the step of crawling the page, and then start the loop until all the crawling steps are completed. In this way, we can get the information data that we could not get before, and store the results locally.
[0019] The specific implementation steps of step 2 are: Environment required for importing the project: (1) Integrated development environment: JDK1.8+Idea2021+Pycharm2018 (2) Hardware environment: PC CPU: I5+, memory: 165G or more, three virtual machines Centos6.4 (3) Development language: Python, Java, Scala (4) Project construction: Maven3.6; Build Hadoop + Flume-managed Spark as the platform framework, use Hadoop as a large database, a distributed component HDFS, for the safe backup of 3 files, its main functions are disaster details, disaster dictionary, disaster handling specifications. In addition, in order to facilitate interaction with the web end, the result data is mainly stored in mysql.
[0020] There are two important fields in the crawled data, one is the level of the disaster, and the other is the type of disaster. In order to analyze the proportion of different types of disasters, the calculation logic. First, clean and transform the data, group them according to the level and type of the disaster, and then aggregate them, so that we can get different levels and types of different types. In order to calculate the proportion, we need to calculate the total amount of all disasters, then use the total amount as the denominator of each type, and then multiply it by 100%, which is our final result. The final designed tables are the disaster level dictionary table (disaster_level) and the disaster level result table (part1).
[0021] The specific implementation steps of step 3 are: According to the analysis theme and indicators, the required data is divided into libraries and tables, and an ER relationship diagram is established to clearly display the relationship between tables. The database is layered and designed in combination with a dimensional model. Data analysis and calculation module: mainly uses SparkCore and SparkSql technology, and then analyzes and calculates according to the business theme, and finally obtains the result data, and then stores the result data in relational data for the next step of visualization.
[0022] Column Name illustrate Data Types length Not empty restriction Primary Key Id Primary Key uniqueidentifier 50 Not null season_id Season ID Varchar 2500 Not null city_id City ID Varchar 30 Not null remark Rainfall Varchar 500 Not null rainfull Region ID Varchar 50 Not null disaster_id Disaster level id Varchar 50 Not null city_name City Name Varchar 50 Not null The specific implementation steps of step 4 are: The database storage mainly uses HDFS, HIVE, MYSQL, etc. Due to the large amount of data, the traditional relational data cannot handle a large amount of information well, so a decentralized storage structure must be adopted.
[0023] The specific implementation steps of step 5 are: The system is complete, so the login and registration functions are essential. When users use it, they first go through the registration page registration form. There are corresponding verification rules for passwords and email addresses, and in actual production, the data must be encrypted with md5 to ensure data security. After successful registration, users can log in. When logging in, they need to register their login name and password, so that they can log in effectively. Otherwise, they will not have permission to access the next step of login.
[0024] The specific implementation steps of step 6 are: The overview statistics module mainly includes analysis of disasters from different dimensions, such as the level of disasters, the relationship between disasters and years, the relationship between disasters and regions, and the relationship between disasters and seasons. Through analysis from different dimensions, we can understand and recognize disasters from different levels and angles, so that we can make more detailed prevention and strategy adjustments to minimize unnecessary loss of property and life.
[0025] The present invention is an abnormal weather prevention application that is applied to abnormal weather data analysis by using a data crawling and analysis method. The program crawls the required meteorological data from the meteorological science professional knowledge service system, and then processes the crawled data to keep the required meteorological data, which reduces the subsequent workload to a certain extent. The cleaned data is then stored in various databases for subsequent analysis, and the obtained results are presented on the page, allowing users to obtain the analysis results more intuitively and vividly. The specific system composition is as follows Figure 1 As shown in the flow chart, Figure 2 shown.
[0026] The data is collected using Python technology. The main process includes the following steps. The first is the initial start condition, and then set the initial URL, which is the tool we use to crawl data. Then use the simulated client of requests to make requests, and then extract the information on the web page. We use the xpath tool to extract the HTML page content, and then parse and store the collected data. On the other hand, splice the next URL. After the splicing is completed, determine whether it is effective. If the conditions are met, we return to the step of crawling the page, and then start the loop until the crawling steps are completed. In this way, we can get the information data that we couldn’t get before, and store the results locally. The data collection process is as follows: Figure 3 shown.
[0027] The design of data storage uses Hadoop as a large database, a distributed component HDFS, for the safe backup of 3 files. Its main functions are detailed disaster information, disaster dictionary, and disaster handling specifications. In addition, in order to facilitate interaction with the web end, the result data is mainly stored in MySQL, including data on disaster level ratio analysis, data related to the number of disasters and months, data related to the frequency and region of disasters, etc. This data is mainly convenient for back-end query work, business processes such as Figure 4The order of user login is as follows: first, the user sends a request on the browser side. After the account and password are verified, the user can log in to access the server resources. The server transmits the data in the https protocol and json format according to the accessed characters, and then returns it to the browser. After rendering and style adjustment, the browser displays the result, and the user can see the detailed content. The specific process is as follows: Figure 5 shown.
[0028] There are two important fields in the crawled data, one is the level of the disaster, and the other is the type of disaster. In order to analyze the proportion of different types of disasters, the calculation logic. First, clean and transform the data, group them according to the level and type of the disaster, and then aggregate them, so that we can get different levels and types of situations. In order to calculate the proportion, we need to calculate the total amount of all disasters, and then use the total amount as the denominator of each type, and then multiply it by 100%. This is our final result. The final designed tables include the disaster level dictionary table (disaster_level) and the disaster level result table (part1). The specific principles are as follows Figure 6 shown.
[0029] Database storage mainly uses HDFS, HIVE, MYSQL, etc. Due to the large amount of data, traditional relational databases cannot handle large amounts of information well, so a decentralized storage structure must be used. First of all, we rarely store massive data directly in traditional relational databases. Although relational data has advantages such as low latency, support for transactions and indexes, these are all based on a certain amount of data. Because our data is relatively large, we use a distributed storage system. The database ER diagram we set is as follows: Figure 7 shown.
[0030] The application is a complete system, so the login and registration functions are essential. When using it, users first go through the registration page registration form. There are corresponding verification rules for passwords and email addresses, and in actual production, data must be encrypted with md5 to ensure data security. After successful registration, users can log in. When logging in, they need to provide the login name and password when registering, so that they can log in effectively. Otherwise, they will not have permission to access the next step of login. The login interface of the application is as follows Figure 8 shown.
[0031] The visualization module of this application mainly includes the analysis of disasters from different dimensions, such as the level of disasters, the relationship between disasters and years, the relationship between disasters and regions, and the relationship between disasters and seasons. Through the analysis of different dimensions, we can understand and recognize disasters from different levels and angles, so that we can make more detailed prevention and strategy adjustments to reduce unnecessary property and life losses as much as possible. The visualization module is as follows: Fig. 9 shown.
Claims
1. A method for visualizing meteorological anomalies based on big data, characterized in that: The method crawls the information needed on the website in real time, making the crawled data timely and authentic, and specifically includes the following steps: 1) Initialization conditions, set the initial URL; 2) Use the simulated client of requests to make requests and extract information from the web page; 3) Use the xpath tool to extract the html page content and parse and store the collected data; 4) Splice the next URL and determine whether it is effective after the splicing is completed; 5) If the conditions are met, return to the step of crawling the page, and then start the loop until all the crawling steps are completed; in this way, you can get the information data that was not available before, and store the results locally.
2. The method for visualizing meteorological anomalies based on big data according to claim 1, characterized in that: The data is stored locally, and data cleaning is to use Spark-Core technology to read the original data from the CSV file, and then process and transfer the data through null value judgment, deduplication, regularization test and format conversion, and finally process it into standard structured data, reducing the subsequent program running volume and improving the program running speed to a certain extent.
3. The method for visualizing meteorological anomalies based on big data according to claim 2 is characterized in that: The Spark-Core technology uses Hadoop as a large database and a distributed component HDFS for secure backup of multiple files, which ensures the security of the program to a certain extent and facilitates subsequent data queries. According to the analysis theme and indicators, the required data is divided into libraries and tables, and an ER relationship diagram is established to clearly display the relationship between tables. The database is layered and designed in combination with a dimensional model; data analysis and calculation module: it uses Spark-Core and SparkSql technology, and then performs analysis and calculation according to the business theme, and finally obtains the result data, and then stores the result data in relational data to facilitate the next step of visualization.
4. The method for visualizing meteorological anomalies based on big data according to claim 3 is characterized in that: The front-end and back-end design of the database uses Vue, Thremleaf, js, css, echarts, and html to display the results in the form of charts, which is clearer; the back-end technology is SpringBoot, Mybaties, and SQL technology, which can interact with the data to realize the functions of adding, deleting, modifying, and checking the data.
5. The method for visualizing and analyzing meteorological anomalies based on big data according to claim 4 is characterized in that: The implementation of adding, deleting, modifying and checking data completes the optimization of the program, sets up a training from crawling to data analysis to visualization, and after the application training is completed, checks whether the operation of the program is reasonable, and analyzes the results to check the scientificity and reliability of the operation results.
6. The method for visualizing and analyzing meteorological anomalies based on big data according to claim 5 is characterized in that: The inspection program is run reasonably, the program training is completed and tested, the meteorological data analysis and visualization system uses Python to extract meteorological data from the meteorological website, the system will process all the data and leave reliable data, such as obvious changes in temperature and wind speed changes, and transfer the data to a relative database for subsequent data analysis; the analyzed data is then summarized and presented on our visualization page, and protection is carried out according to the presented results to ensure the safety of life and property.
