system
The system addresses the challenge of providing rapid and accurate earthquake information by scraping and storing epicenter data from weather providers, enhancing real-time local information access.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2026-03-06
AI Technical Summary
Conventional earthquake information systems fail to provide users with the latest and past information quickly and accurately, especially lacking real-time local information during large-scale earthquakes, making it difficult to respond effectively.
A system that scrapes epicenter information from weather information providers, stores it in a database, and provides it to users in real-time, with the ability to collect and display real-time local information from social networking services and news sites upon request.
Enables users to obtain the latest earthquake information and local situation rapidly, facilitating timely and appropriate responses.
Smart Images

Figure 2026038211000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] With conventional earthquake information provision systems, it was difficult for users to quickly and accurately obtain the latest and past information they needed. Furthermore, after a large-scale earthquake occurred, a lack of real-time information on the local situation and damage made it difficult to respond quickly. To solve these issues, a system was needed that could quickly provide the latest and past earthquake information, as well as collect and provide real-time local information. [Means for solving the problem]
[0005] The present invention provides a system including a means for scraping and acquiring epicenter information from the websites of weather information providers, a means for storing the acquired epicenter information in a database, a means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, and a means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user. The present invention also includes a function for acquiring the most recent epicenter information from the database when a user requests the most recent epicenter information, and a function for acquiring epicenter information for a specific location from the database when a user requests epicenter information for a fixed point. Furthermore, after a large-scale earthquake occurs, a means for crawling social networking services and news sites is added to automatically collect real-time local information, and the real-time local information is stored in a database and provided in response to a user request, thereby achieving rapid and accurate information provision.
[0006] "Epicenter information" refers to basic data about earthquakes, such as the location and time of occurrence of the earthquake, magnitude, and depth of the epicenter.
[0007] "Scraping" is a method of automatically collecting and analyzing website information using a program.
[0008] A "database" refers to a collection of data that is designed to systematically store specific information and enable efficient search and retrieval.
[0009] "User" refers to an entity that uses the system to obtain epicenter information and other information.
[0010] A "request" refers to a request sent by a user to a system requesting specific information.
[0011] "Real-time information" refers to up-to-date information provided very shortly after an event occurs.
[0012] "Social networking service" refers to a service that allows users to share information and communicate with each other over the Internet.
[0013] "News site" refers to a website that provides the latest news and articles on the Internet.
[0014] "Crawling" refers to the action of a program crawling through websites to automatically gather information on the Internet.
[0015] "Terminal" refers to a device used by a user to input and display information. [Brief explanation of the drawings]
[0016] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION
[0017] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.
[0018] First, the terms used in the following description will be explained.
[0019] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).
[0020] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.
[0021] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.
[0022] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.
[0023] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."
[0024] [First embodiment]
[0025] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0026] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.
[0027] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0028] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.
[0029] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.
[0030] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.
[0031] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.
[0032] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0033] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0034] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0035] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0036] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0037] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[0038] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[0039] For example, a user sends a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0040] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." When the user opens the app and presses the "information on the most recent earthquakes" button, the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0041] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[0042] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation, enabling them to take appropriate action.In this way, the present invention quickly and accurately provides users with the epicenter and local information they need.
[0043] The processing flow will be explained below.
[0044] Step 1:
[0045] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[0046] Step 2:
[0047] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0048] Step 3:
[0049] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[0050] Step 4:
[0051] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[0052] Step 5:
[0053] The device sends the user's request to the server as an HTTP request to the API endpoint.
[0054] Step 6:
[0055] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[0056] Step 7:
[0057] The server queries the database to obtain the required epicenter information.
[0058] Step 8:
[0059] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[0060] Step 9:
[0061] The terminal analyzes the received JSON data and displays the information in a format that is easy for the user to view (e.g., table or card format).
[0062] Step 10:
[0063] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[0064] Step 11:
[0065] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[0066] Step 12:
[0067] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[0068] Example 1
[0069] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0070] Conventional earthquake information systems take time to acquire and provide earthquake information, making it difficult to provide users with earthquake information in real time. Furthermore, many systems incur high costs for acquiring and analyzing earthquake information, creating a need for an efficient, low-cost method for providing earthquake information. Furthermore, a system is needed that can quickly and easily provide the latest earthquake information or earthquake information for specific locations in response to user requests.
[0071] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0072] In this invention, the server includes means for scraping and acquiring epicenter information from the weather information provider's website, means for saving the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for sending the acquired epicenter information to the user's terminal in JSON format and displaying it, means including a task scheduler for periodically sending HTTP requests to the weather information provider's website, and HTML parsing means for analyzing the epicenter information. This makes it possible to acquire epicenter information efficiently in real time and provide it to the user promptly.
[0073] "Weather information providers" are public or private organizations that provide information on earthquakes and weather.
[0074] "Scraping" is a technique for automatically extracting specific information from a website.
[0075] "Epicenter information" refers to detailed information such as the location where the earthquake occurred, the time of occurrence, magnitude, and depth of the epicenter.
[0076] A "database" is a system for efficiently storing, managing, and searching acquired data.
[0077] A "user request" is an operation or inquiry by a user requesting specific information from the system.
[0078] A "task scheduler" is a software function that automatically executes specific tasks periodically.
[0079] An "HTTP request" is a request that a client (in this case, a server) sends to a website to obtain data.
[0080] An "HTML response" is data containing the content of a web page returned from a web server to a client.
[0081] "JSON format" is an abbreviation for JavaScript (registered trademark) Object Notation, and is a lightweight data format for exchanging data.
[0082] A "terminal" is a device (e.g., a smartphone or PC) that a user uses to access the system.
[0083] "HTML parsing" is the process of analyzing an HTML document and extracting the necessary information.
[0084] "Latest epicenter information" refers to information on the occurrence of the most recent earthquake.
[0085] "Fixed-point epicenter information" refers to information on earthquake occurrences at specific locations.
[0086] This invention is a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[0087] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. At this time, the server uses a task scheduler such as a Linux (registered trademark) cron job. The server obtains the HTML response obtained through the HTTP request using the requests library and parses it using an HTML parsing library such as BeautifulSoup.
[0088] As a specific example, information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth, is extracted from the HTML response. The information obtained in this way is stored by the server in a database such as MySQL (registered trademark).
[0089] The user uses a device to send a request saying, "I want to know the latest earthquake information." When the user opens the smartphone app and presses the "Latest Earthquake Information" button, the device sends this request to the server. The device communicates with the server via an HTTP request.
[0090] The server analyzes the received request and retrieves the latest epicenter information from the database. The information is returned to the terminal in JSON format. The terminal analyzes the returned JSON data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0091] Additionally, the server collects real-time local information by crawling field surveys, news sites, and social networking services. In the event of a major earthquake, this additional information is also stored in the database and made available upon user request.
[0092] Example prompt sentences
[0093] Prompt sentence for collecting weather information
[0094] Update weather data from {website_url} at {time_interval}.
[0095] Prompt text for providing earthquake information to users
[0096] Provide the latest earthquake information to the user based on the request.
[0097] This system allows users to quickly obtain not only the latest information on the epicenter, but also information on the extent of damage and evacuation, enabling them to take appropriate action.
[0098] The system uses common software and hardware such as Linux, requests, BeautifulSoup, and MySQL, allowing it to provide earthquake information efficiently and cost-effectively.
[0099] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0100] Step 1:
[0101] The server uses a task scheduler to set up periodic tasks. For example, a Linux cron job is used as a task scheduler. The server uses this task to access the weather information provider's website at regular intervals. The input is the task scheduler settings, and the output is the periodic task execution. Specifically, the server sets up the following cron job:
[0102] (Example: 0 / usr / bin / python3 / path / to / scrape_script.py)
[0103] Step 2:
[0104] The server sends an HTTP request to the weather information provider's website according to the task scheduler. The server uses the requests library to access the website and get the HTML response. The input is the HTTP request, and the output is the HTML response. Specifically, the server sends the following request:
[0105] python
[0106] response = requests.get('https: / / example.com / earthquake')
[0107] Step 3:
[0108] The server analyzes the HTML response it receives. It uses BeautifulSoup to parse the response and extract the necessary epicenter information. The input is the HTML response, and the output is epicenter information (earthquake occurrence location, occurrence time, magnitude, and epicenter depth). Specifically, the information is extracted as follows:
[0109] python
[0110] soup = BeautifulSoup(response.content, 'html.parser')
[0111] location = soup.find('div', class_='location').text
[0112] event_time = soup.find('div', class_='time').text
[0113] magnitude = float(soup.find('div', class_='magnitude').text)
[0114] depth = float(soup.find('div', class_='depth').text)
[0115] Step 4:
[0116] The server stores the extracted epicenter information in a database. The server uses a database system such as MySQL to store the information permanently. The input is the epicenter information, and the output is the stored data. Specifically, the data is stored as follows:
[0117] python
[0118] db = mysql.connector.connect(
[0119] host="localhost",
[0120] user="user",
[0121] password="password",
[0122] database="earthquake_db"
[0123] )
[0124] cursor = db.cursor()
[0125] sql = "INSERT INTO earthquake_info (location, event_time, magnitude, depth) VALUES (%s, %s, %s, %s)"
[0126] values = (location, event_time, magnitude, depth)
[0127] cursor.execute(sql, values)
[0128] db.commit()
[0129] Step 5:
[0130] The user uses a device to send a request saying, "I want to know the latest earthquake information." The input is the user's request, and the output is the transmission of the request data. Specifically, the user presses the "Latest Earthquake Information" button on the smartphone app.
[0131] Step 6:
[0132] The terminal sends the user's request to the server. The terminal sends information to the server through an HTTP request. The input is the user's request, and the output is the request data sent to the server. Specifically, the request is sent as follows:
[0133] javascript
[0134] fetch('https: / / example.com / api / latest-earthquake')
[0135] .then(response => response.json())
[0136] .then(data => {
[0137] / / Handle data
[0138] });
[0139] Step 7:
[0140] The server analyzes the received request and retrieves the latest epicenter information from the database. The input is the user's request and the database, and the output is the latest epicenter information. Specifically, the server executes the query as follows:
[0141] python
[0142] sql = "SELECT FROM earthquake_info ORDER BY event_time DESC LIMIT 1"
[0143] cursor.execute(sql)
[0144] result = cursor.fetchone()
[0145] Step 8:
[0146] The server returns the acquired information in JSON format to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data. Specifically, the server converts the information and returns it as follows:
[0147] python
[0148] data = {
[0149] 'location': result[1],
[0150] 'event_time': result[2],
[0151] 'magnitude': result[3],
[0152] 'depth': result[4]
[0153] }
[0154] return jsonify(data)
[0155] Step 9:
[0156] The terminal parses the received JSON data and displays it to the user. The input is the epicenter information in JSON format, and the output is the information to be displayed to the user. Specifically, the terminal parses the data and displays it on the screen as follows:
[0157] javascript
[0158] fetch('https: / / example.com / api / latest-earthquake')
[0159] .then(response => response.json())
[0160] .then(data => {
[0161] document.getElementById('location').innerText = data.location;
[0162] document.getElementById('event_time').innerText = data.event_time;
[0163] document.getElementById('magnitude').innerText = data.magnitude;
[0164] document.getElementById('depth').innerText = data.depth;
[0165] });
[0166] (Application example 1)
[0167] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0168] In recent years, the importance of real-time earthquake monitoring and rapid information sharing has increased. There is a demand for systems that are easy to use and can be used immediately, without the need for dedicated devices or special facilities. However, many current systems have difficulty providing real-time information without delay in response to user requests, and there is no established method for providing evacuation guidance information quickly and appropriately in the event of a disaster. Improving this situation is a challenge.
[0169] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0170] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users and searching the database based on the requests to acquire corresponding epicenter information, means for transmitting and displaying the acquired epicenter information to a terminal to provide it to the user, scheduling means for automatically acquiring epicenter information at specified time intervals, and means for providing evacuation information in real time when a disaster occurs. This makes it possible to provide earthquake information and evacuation information to users quickly and accurately in real time.
[0171] A "weather information provider" is an organization or institution that collects, analyzes, and makes weather data available to the public.
[0172] "Epicenter information" refers to detailed data such as the location, time, magnitude, and depth of the earthquake's epicenter.
[0173] "Scraping" is a method of programmatically obtaining and analyzing data on the web.
[0174] A "database" is a system that systematically stores data and manages it so that it can be searched and retrieved efficiently.
[0175] "User" means an individual or organization that uses the system.
[0176] A "request" is a query or request for information made by a user to a system.
[0177] A "server" is a computer system that responds to requests from clients over a network and provides services.
[0178] A "terminal" is a computer or device that is directly operated by a user.
[0179] A "scheduling means" is a function or mechanism for automatically executing tasks at specific time intervals.
[0180] "Evacuation information" refers to information that guides people to safe locations and instructs them on appropriate actions when a disaster occurs.
[0181] This invention relates to a system in which a server scrapes earthquake information from the websites of weather information providers at regular intervals, stores the acquired information in a database, and provides information in real time in response to user requests.
[0182] Specifically, the server uses a task scheduler to periodically send HTTP requests to the weather information provider's website. The HTML response obtained through this request is analyzed to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The database is managed using a database system such as SQLite.
[0183] When a user wants to know the "most recent epicenter information" on a device such as a smartphone or PC, they open the application and send a request. The request from this device is sent to a server, which searches the database for the most recent epicenter information and returns it in JSON format to the device. The device reads this information and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0184] Furthermore, when a large-scale earthquake occurs, the server crawls social media and news sites to collect local information and stores this information in the database. When a user sends a request to "know the local situation," the server also searches for and provides the latest information collected through the crawl. This allows users to quickly obtain not only the latest earthquake information, but also evacuation information and damage status.
[0185] The server uses Python to parse HTML using the BeautifulSoup library and saves the information in an SQLite database. It also uses Flask to build an API server to respond to user requests. It uses the Python schedule library for scheduling.
[0186] As a concrete example, if a magnitude 6.5 earthquake occurs in Tokyo, the server automatically retrieves this information from the website and stores it in an SQLite database. When a user sends a request for "latest earthquake information" via an application on their smartphone, the server immediately returns the latest information, allowing the user to check the earthquake information on their device. It can also provide users with evacuation information and information on the local situation.
[0187] An example prompt for a generative AI model is:
[0188] "Write a Python program to scrape earthquake information from the website of a weather information provider and notify users in real time. Store the information in an SQLite database and build an API server using Flask. Also, set up a scheduler to retrieve the information periodically."
[0189] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0190] Step 1:
[0191] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals.
[0192] Input: Task Scheduler trigger (time interval)
[0193] Data processing: Sending an HTTP request
[0194] Output: HTML response
[0195] Specific operation: The server uses Python's requests library to periodically send HTTP GET requests to the specified URL.
[0196] Step 2:
[0197] The server parses the HTML response it receives and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0198] Input: HTML response
[0199] Data processing: HTML parsing using BeautifulSoup
[0200] Output: Earthquake information (location, time, magnitude, depth of earthquake)
[0201] What it does: The server uses the BeautifulSoup library to parse the HTML and extract earthquake information from specific tags and classes.
[0202] Step 3:
[0203] The server stores the acquired epicenter information in a database.
[0204] Input: Epicenter information
[0205] Data processing: Insertion into database
[0206] Output: The epicenter information is saved in the database.
[0207] Specific operation: The server uses the SQLite library to insert the extracted epicenter information into an SQLite database.
[0208] Step 4:
[0209] The user requests "information on the most recent earthquake epicenter" from their smartphone or computer.
[0210] Input: User request
[0211] Data processing: Analysis of request information
[0212] Output: Request content
[0213] Specific operation: The user opens a dedicated app or web page and enters a request to know the "most recent epicenter information."
[0214] Step 5:
[0215] The server receives the user request and retrieves the latest epicenter information from the database.
[0216] Input: User request
[0217] Data processing: Database search
[0218] Output: Latest earthquake information
[0219] Specific operation: The server analyzes the received request and retrieves the most recent earthquake epicenter information from the SQLite database.
[0220] Step 6:
[0221] The server returns the acquired epicenter information to the user's device in JSON format.
[0222] Input: Latest epicenter information
[0223] Data processing: Conversion to JSON format
[0224] Output: JSON format data
[0225] Specific operation: The server converts the acquired data into JSON format using Python's json library and returns it to the user's device as an HTTP response.
[0226] Step 7:
[0227] The terminal displays the epicenter information received from the server to the user.
[0228] Input: JSON format data
[0229] Data processing: Data analysis and presentation
[0230] Output: Display of epicenter information
[0231] Specific operation: The user's device parses the JSON data and displays the earthquake information on the screen. This means that the latest earthquake information is provided visually to the user on a smartphone app or web page.
[0232] Step 8:
[0233] The server provides real-time evacuation information in the event of a disaster.
[0234] Input: Additional information stored in the database (e.g., information from social media sites, news sites)
[0235] Data processing: Crawling to acquire information and storing it in a database
[0236] Output: Evacuation information
[0237] Specific operation: When a large-scale earthquake occurs, the server crawls social media and news sites, collects evacuation information, stores it in a database, and provides this information upon user request.
[0238] Through the above steps, the server, terminal, and user each fulfill their respective roles, enabling the rapid and accurate provision of epicenter information and evacuation information in real time.
[0239] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.
[0240] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests, combined with an emotion engine that recognizes user emotions.
[0241] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[0242] A user, for example, uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches and retrieves the latest epicenter information from its database. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0243] The present invention further incorporates an emotion engine to adjust the presentation of epicenter information according to the user's emotional state. The emotion engine analyzes emotions from the user's input, voice, and facial expressions. If the user is feeling stressed or scared, the emotion engine changes the display format of the epicenter information based on the analysis results.
[0244] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is then sent to the device in JSON format, which the device reads and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0245] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[0246] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[0247] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation information, enabling them to take appropriate action and providing information that suits the user's emotional state.In this way, the present invention is a system that quickly and accurately provides the epicenter and local information that users need, while at the same time providing flexible information that takes into account the user's emotional state.
[0248] The processing flow will be explained below.
[0249] Step 1:
[0250] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[0251] Step 2:
[0252] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0253] Step 3:
[0254] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[0255] Step 4:
[0256] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[0257] Step 5:
[0258] The device sends the user's request to the server as an HTTP request to the API endpoint.
[0259] Step 6:
[0260] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[0261] Step 7:
[0262] The server queries the database to obtain the required epicenter information.
[0263] Step 8:
[0264] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[0265] Step 9:
[0266] The emotion engine analyzes the user's facial expressions, voice, and inputs to assess their emotional state, using the device's built-in camera and microphone.
[0267] Step 10:
[0268] The device receives the analysis results of the emotion engine and determines the display format according to the user's emotional state. For example, if the user is feeling stressed, the device will reduce the amount of information displayed and provide earthquake information in a simplified format.
[0269] Step 11:
[0270] The device displays the epicenter information generated based on the analysis results to the user, and if necessary, additional safety information and evacuation advice may also be displayed.
[0271] Step 12:
[0272] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[0273] Step 13:
[0274] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[0275] Step 14:
[0276] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[0277] Example 2
[0278] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0279] In conventional earthquake information provision systems, it is important to provide users with appropriate information quickly. However, because they do not take into account the user's emotional state, there is a problem in that the information provided is insufficient for users who feel fear or anxiety, and they are unable to convey appropriate countermeasures. Furthermore, there is also the issue of quickly collecting local information and providing it to users when a large-scale earthquake occurs.
[0280] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0281] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users, searching the database based on the requests, and acquiring corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, and means for adjusting the display of information according to the user's emotional state using an emotion engine that analyzes the user's emotions. This makes it possible to provide epicenter information while taking the user's emotional state into consideration, and to quickly convey appropriate countermeasures and reassurance information to users who are feeling anxious or scared. Furthermore, when a large-scale earthquake occurs, local information can be quickly collected and provided to users.
[0282] "Weather data providers" are organizations or institutions that collect and analyze weather and disaster data and provide it to the public.
[0283] "Scraping" is a technique for automatically obtaining specific data from a website.
[0284] "Epicenter information" is a general term for specific data about earthquakes, such as the location and time of occurrence, magnitude, and depth of the epicenter.
[0285] A "database" is a system for efficiently storing, retrieving, and managing data.
[0286] A "request" is an action or content of a user requesting some information or service from the system.
[0287] An "emotion engine" is software or algorithms that analyze a user's emotional state based on their input, voice, facial expressions, etc.
[0288] A "task scheduler" is a system for automatically executing specific tasks or programs at regular intervals.
[0289] "Analysis" is the process of examining data or information in detail to understand its content and meaning.
[0290] "Adjustment" is the act of appropriately modifying information or behavior to suit specific conditions or requirements.
[0291] "JSON format" stands for JavaScript Object Notation and is a format for storing and exchanging data in text format.
[0292] This invention combines a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests with an emotion engine that recognizes user emotions.
[0293] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). Specifically, the server uses Python's requests module to send the HTTP requests and parses the HTML response it receives using BeautifulSoup. From the parsed data, it extracts information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The extracted data is then saved in a database management system such as MySQL or PostgreSQL. An ORM library such as sqlalchemy is used to insert the data into the database.
[0294] A user uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends an HTTP request to the server, which then analyzes the request. Based on the analysis results, the server searches and retrieves the most recent epicenter information from a database and returns it in JSON format to the device. The device then displays the received JSON data to the user. HTML and CSS are often used for display.
[0295] The system also incorporates an emotion engine that analyzes emotions from user input, voice, and facial expressions. The emotion engine uses software such as TENSORFLOW (registered trademark) and OpenCV. The device sends data obtained using the user's camera and microphone to the emotion engine, which then analyzes the user's emotional state in real time. Based on the analysis results, the server adjusts the display format of information according to the user's emotional state. For example, if the user is feeling fear or stress, the server simplifies the display of earthquake source information and adds reassurance information and evacuation advice.
[0296] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server retrieves the latest earthquake information from the database and sends it in JSON format to the device. The device analyzes the retrieved data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0297] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device adjusts the display of information about the earthquake's source, such as providing immediate information about the extent of the earthquake's impact, evacuation sites, and first aid procedures, to ease the user's anxiety.
[0298] A specific example of a prompt sentence is, "Please tell me the steps to take if I want to know the latest earthquake information using a smartphone app." This system responds quickly and accurately to such specific requests, providing information that takes into account the user's emotional state.
[0299] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0300] Step 1:
[0301] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). It uses the requests module to send the requests and receive HTML responses. The input is the HTTP request, and the output is the HTML response.
[0302] Step 2:
[0303] The server parses the received HTML response using BeautifulSoup. Specifically, it extracts the earthquake's location, time, magnitude, and epicenter depth from specific HTML tags and classes. The input is the HTML response, and the output is the extracted epicenter information (e.g., "Location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", "Depth: 10km").
[0304] Step 3:
[0305] The server converts the extracted epicenter information into dictionary format and stores it in a MySQL or PostgreSQL database using sqlalchemy. The input is the dictionary format of the epicenter information, and the output is the epicenter information stored in the database.
[0306] Step 4:
[0307] A user uses an application on a smartphone or computer to send a request from the device saying, "I want to know the most recent epicenter information." The input is the user's request, "I want to know the most recent epicenter information," and the output is sent to the server as an HTTP request.
[0308] Step 5:
[0309] The terminal sends a request from the user to the server as an HTTP request. The input is the request from the user, and the output is the HTTP request sent to the server.
[0310] Step 6:
[0311] The server analyzes the received HTTP request and searches the database for the latest earthquake source information. For example, it uses an SQL SELECT statement to execute a query such as "SELECT FROM earthquake_info ORDER BY time DESC LIMIT 1." The input is the HTTP request and the database contents, and the output is the latest earthquake source information.
[0312] Step 7:
[0313] The server converts the acquired epicenter information into JSON format and sends it to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data.
[0314] Step 8:
[0315] The terminal analyzes the received JSON data and displays information to the user, such as the epicenter, time of occurrence, magnitude, depth of the epicenter, etc. The input is the epicenter information in JSON format, and the output is the information to be displayed.
[0316] Step 9:
[0317] The device sends data obtained using the user's camera and microphone to the emotion engine, which then uses TensorFlow and OpenCV to analyze the user's emotional state in real time. The input is data obtained from the camera and microphone, and the output is the result of analyzing the user's emotions.
[0318] Step 10:
[0319] If the emotion engine analyzes the user's emotion as "fear" or "anxiety," the server simplifies the display of the epicenter information and adds reassurance information and evacuation advice. The input is the emotion analysis result, and the output is the adjusted epicenter information.
[0320] Step 11:
[0321] The server converts the adjusted epicenter information back into JSON format and sends it back to the terminal. The input is the adjusted epicenter information, and the output is JSON format data.
[0322] Step 12:
[0323] The device again analyzes the received JSON data and displays the adjusted information to the user. For example, it might display information such as "Earthquake location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", and "Please evacuate immediately". The input is the adjusted JSON data, and the output is the adjusted information displayed to the user.
[0324] (Application example 2)
[0325] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0326] Conventional earthquake information systems simply provide users with information about the epicenter, and lack consideration for the fear and stress felt by users. Furthermore, there is a need for systems that not only provide the latest epicenter information in real time, but also properly communicate local conditions and evacuation information in the event of a large-scale earthquake. To address these issues, it is necessary to provide a system that reduces the mental burden on users and allows them to receive information quickly and with peace of mind.
[0327] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0328] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, means for analyzing the user's emotional state, and means for adjusting the display of the epicenter information based on the analysis results. This enables flexible information provision according to the user's emotional state and rapid provision of local information when a large-scale earthquake occurs.
[0329] A "weather information provider" is an organization that collects and provides information related to weather and natural disasters such as earthquakes.
[0330] "Epicenter information" refers to information about the location, time, magnitude, and depth of the earthquake's epicenter.
[0331] "Scraping" is a technique for automatically obtaining specific information from a web page.
[0332] A "database" is a system for systematically storing and managing information.
[0333] A "request" is an act by a user requesting specific information from the system.
[0334] "Emotional state" refers to the user's psychological state, including emotions such as fear and stress.
[0335] "Analysis" is the act of examining data or information in detail to clarify its meaning.
[0336] "Adjusting the display" refers to changing the way information is displayed depending on the user's situation.
[0337] The present invention relates to a system for scraping earthquake information from the websites of weather information providers and storing the acquired information in a database. Specific embodiments will be described below.
[0338] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The HTML response obtained through this request is parsed to extract earthquake epicenter information such as the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The main software used is Python for scraping and database operations, and SQLite is used as the database.
[0339] For example, a user can use a smartphone to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0340] A distinctive feature of this invention is the incorporation of an emotion engine. The emotion engine analyzes emotions from user input (voice, facial expressions). For example, the Emotion API from Microsoft® Azure® can be used. If the emotion engine determines that the user is feeling fear or stress, it adjusts the format of the epicenter information displayed on the device screen. Specifically, it can simplify the epicenter information and display additional reassurance information and evacuation advice. This can alleviate the user's anxiety and encourage appropriate behavior.
[0341] For example, if a user wants to get "information on the latest earthquakes" using a smartphone, they open the app and press the "Latest Earthquake Information" button, and the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0342] Additionally, if the emotion engine analyzes the user's facial expressions using a camera and detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[0343] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[0344] Get recent earthquake data.
[0345] Analyze user sentiment.
[0346] If they are feeling scared or stressed, provide reassurance information.
[0347] In this way, the present invention is a system that quickly and accurately provides the epicenter information and local information required by the user, while at the same time realizing flexible information provision that takes into account the emotional state of the user.
[0348] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0349] Step 1:
[0350] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The input is a notification from the task scheduler, and the output is the HTML response it receives. After receiving the HTML response, the server parses it using a library such as BeautifulSoup to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth.
[0351] Step 2:
[0352] The server stores the extracted epicenter information in a database. The input is the epicenter information obtained in step 1, and the output is the epicenter information stored in the database. The server stores the information using a database management system such as SQLite.
[0353] Step 3:
[0354] A user uses a smartphone to send a request from the device saying, "I want to know the latest epicenter information." The input is the user's request, and the output is the request sent to the server. The device sends an HTTP request to the server.
[0355] Step 4:
[0356] The server analyzes the received user request and retrieves the latest earthquake information from the database. The input is the user request and the database, and the output is the retrieved latest earthquake information in JSON format.
[0357] Step 5:
[0358] The server sends the acquired epicenter information to the terminal. The input is the epicenter information acquired in step 4, and the output is sent to the terminal. The server returns JSON data to the terminal as an HTTP response.
[0359] Step 6:
[0360] The terminal displays the epicenter information received from the server to the user. The input is JSON data from the server, and the output is the display of the epicenter information on the screen. The terminal analyzes the received data and displays it on the screen.
[0361] Step 7:
[0362] The device detects the user's emotional state using a camera or microphone and sends it to the emotion engine. The input is the user's facial expression and voice data, and the output is sent to the emotion engine. The device acquires data from the camera or microphone and requests the emotion engine to analyze it.
[0363] Step 8:
[0364] The emotion engine analyzes the user's emotional state. The input is facial expression and voice data from the device, and the output is the analysis results. The emotion engine performs its analysis using, for example, Microsoft Azure's Emotion API.
[0365] Step 9:
[0366] The device receives the analysis results from the emotion engine and adjusts the display format. The input is the analysis results of the emotion engine, and the output is the adjusted display. If the user is feeling fear or stress, the device will simplify the display of earthquake source information and add reassurance information and evacuation advice.
[0367] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[0368] Get recent earthquake data.
[0369] Analyze user sentiment.
[0370] If they are feeling scared or stressed, provide reassurance information.
[0371] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0372] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (registered trademark) (Internet search engine).<URL: https: / / openai.com / blog / chatgpt> ), Gemini (registered trademark) (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0373] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.
[0374] [Second embodiment]
[0375] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0376] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0377] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0378] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.
[0379] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0380] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0381] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0382] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0383] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0384] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0385] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0386] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."
[0387] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[0388] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[0389] For example, a user sends a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0390] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." When the user opens the app and presses the "information on the most recent earthquakes" button, the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0391] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[0392] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation, enabling them to take appropriate action.In this way, the present invention quickly and accurately provides users with the epicenter and local information they need.
[0393] The processing flow will be explained below.
[0394] Step 1:
[0395] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[0396] Step 2:
[0397] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0398] Step 3:
[0399] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[0400] Step 4:
[0401] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[0402] Step 5:
[0403] The device sends the user's request to the server as an HTTP request to the API endpoint.
[0404] Step 6:
[0405] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[0406] Step 7:
[0407] The server queries the database to obtain the required epicenter information.
[0408] Step 8:
[0409] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[0410] Step 9:
[0411] The terminal analyzes the received JSON data and displays the information in a format that is easy for the user to view (e.g., table or card format).
[0412] Step 10:
[0413] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[0414] Step 11:
[0415] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[0416] Step 12:
[0417] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[0418] Example 1
[0419] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0420] Conventional earthquake information systems take time to acquire and provide earthquake information, making it difficult to provide users with earthquake information in real time. Furthermore, many systems incur high costs for acquiring and analyzing earthquake information, creating a need for an efficient, low-cost method for providing earthquake information. Furthermore, a system is needed that can quickly and easily provide the latest earthquake information or earthquake information for specific locations in response to user requests.
[0421] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0422] In this invention, the server includes means for scraping and acquiring epicenter information from the weather information provider's website, means for saving the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for sending the acquired epicenter information to the user's terminal in JSON format and displaying it, means including a task scheduler for periodically sending HTTP requests to the weather information provider's website, and HTML parsing means for analyzing the epicenter information. This makes it possible to acquire epicenter information efficiently in real time and provide it to the user promptly.
[0423] "Weather information providers" are public or private organizations that provide information on earthquakes and weather.
[0424] "Scraping" is a technique for automatically extracting specific information from a website.
[0425] "Epicenter information" refers to detailed information such as the location where the earthquake occurred, the time of occurrence, magnitude, and depth of the epicenter.
[0426] A "database" is a system for efficiently storing, managing, and searching acquired data.
[0427] A "user request" is an operation or inquiry by a user requesting specific information from the system.
[0428] A "task scheduler" is a software function that automatically executes specific tasks periodically.
[0429] An "HTTP request" is a request that a client (in this case, a server) sends to a website to obtain data.
[0430] An "HTML response" is data containing the content of a web page returned from a web server to a client.
[0431] "JSON format" is an abbreviation for JavaScript Object Notation, and is a lightweight data format for exchanging data.
[0432] A "terminal" is a device (e.g., a smartphone or PC) that a user uses to access the system.
[0433] "HTML parsing" is the process of analyzing an HTML document and extracting the necessary information.
[0434] "Latest epicenter information" refers to information on the occurrence of the most recent earthquake.
[0435] "Fixed-point epicenter information" refers to information on earthquake occurrences at specific locations.
[0436] This invention is a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[0437] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server uses a task scheduler such as a Linux cron job. The server retrieves the HTML response obtained through the HTTP request using the requests library and parses it using an HTML parsing library such as BeautifulSoup.
[0438] As a specific example, information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth, is extracted from the HTML response. The information obtained in this way is stored in a database such as MySQL by the server.
[0439] The user uses a device to send a request saying, "I want to know the latest earthquake information." When the user opens the smartphone app and presses the "Latest Earthquake Information" button, the device sends this request to the server. The device communicates with the server via an HTTP request.
[0440] The server analyzes the received request and retrieves the latest epicenter information from the database. The information is returned to the terminal in JSON format. The terminal analyzes the returned JSON data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0441] Additionally, the server collects real-time local information by crawling field surveys, news sites, and social networking services. In the event of a major earthquake, this additional information is also stored in the database and made available upon user request.
[0442] Example prompt sentences
[0443] Prompt sentence for collecting weather information
[0444] Update weather data from {website_url} at {time_interval}.
[0445] Prompt text for providing earthquake information to users
[0446] Provide the latest earthquake information to the user based on the request.
[0447] This system allows users to quickly obtain not only the latest information on the epicenter, but also information on the extent of damage and evacuation, enabling them to take appropriate action.
[0448] The system uses common software and hardware such as Linux, requests, BeautifulSoup, and MySQL, allowing it to provide earthquake information efficiently and cost-effectively.
[0449] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0450] Step 1:
[0451] The server uses a task scheduler to set up periodic tasks. For example, a Linux cron job is used as a task scheduler. The server uses this task to access the weather information provider's website at regular intervals. The input is the task scheduler settings, and the output is the periodic task execution. Specifically, the server sets up the following cron job:
[0452] (Example: 0 / usr / bin / python3 / path / to / scrape_script.py)
[0453] Step 2:
[0454] The server sends an HTTP request to the weather information provider's website according to the task scheduler. The server uses the requests library to access the website and get the HTML response. The input is the HTTP request, and the output is the HTML response. Specifically, the server sends the following request:
[0455] python
[0456] response = requests.get('https: / / example.com / earthquake')
[0457] Step 3:
[0458] The server analyzes the HTML response it receives. It uses BeautifulSoup to parse the response and extract the necessary epicenter information. The input is the HTML response, and the output is epicenter information (earthquake occurrence location, occurrence time, magnitude, and epicenter depth). Specifically, the information is extracted as follows:
[0459] python
[0460] soup = BeautifulSoup(response.content, 'html.parser')
[0461] location = soup.find('div', class_='location').text
[0462] event_time = soup.find('div', class_='time').text
[0463] magnitude = float(soup.find('div', class_='magnitude').text)
[0464] depth = float(soup.find('div', class_='depth').text)
[0465] Step 4:
[0466] The server stores the extracted epicenter information in a database. The server uses a database system such as MySQL to store the information permanently. The input is the epicenter information, and the output is the stored data. Specifically, the data is stored as follows:
[0467] python
[0468] db = mysql.connector.connect(
[0469] host="localhost",
[0470] user="user",
[0471] password="password",
[0472] database="earthquake_db"
[0473] )
[0474] cursor = db.cursor()
[0475] sql = "INSERT INTO earthquake_info (location, event_time, magnitude, depth) VALUES (%s, %s, %s, %s)"
[0476] values = (location, event_time, magnitude, depth)
[0477] cursor.execute(sql, values)
[0478] db.commit()
[0479] Step 5:
[0480] The user uses a device to send a request saying, "I want to know the latest earthquake information." The input is the user's request, and the output is the transmission of the request data. Specifically, the user presses the "Latest Earthquake Information" button on the smartphone app.
[0481] Step 6:
[0482] The terminal sends the user's request to the server. The terminal sends information to the server through an HTTP request. The input is the user's request, and the output is the request data sent to the server. Specifically, the request is sent as follows:
[0483] javascript
[0484] fetch('https: / / example.com / api / latest-earthquake')
[0485] .then(response => response.json())
[0486] .then(data => {
[0487] / / Handle data
[0488] });
[0489] Step 7:
[0490] The server analyzes the received request and retrieves the latest epicenter information from the database. The input is the user's request and the database, and the output is the latest epicenter information. Specifically, the server executes the query as follows:
[0491] python
[0492] sql = "SELECT FROM earthquake_info ORDER BY event_time DESC LIMIT 1"
[0493] cursor.execute(sql)
[0494] result = cursor.fetchone()
[0495] Step 8:
[0496] The server returns the acquired information in JSON format to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data. Specifically, the server converts the information and returns it as follows:
[0497] python
[0498] data = {
[0499] 'location': result[1],
[0500] 'event_time': result[2],
[0501] 'magnitude': result[3],
[0502] 'depth': result[4]
[0503] }
[0504] return jsonify(data)
[0505] Step 9:
[0506] The terminal parses the received JSON data and displays it to the user. The input is the epicenter information in JSON format, and the output is the information to be displayed to the user. Specifically, the terminal parses the data and displays it on the screen as follows:
[0507] javascript
[0508] fetch('https: / / example.com / api / latest-earthquake')
[0509] .then(response => response.json())
[0510] .then(data => {
[0511] document.getElementById('location').innerText = data.location;
[0512] document.getElementById('event_time').innerText = data.event_time;
[0513] document.getElementById('magnitude').innerText = data.magnitude;
[0514] document.getElementById('depth').innerText = data.depth;
[0515] });
[0516] (Application example 1)
[0517] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0518] In recent years, the importance of real-time earthquake monitoring and rapid information sharing has increased. There is a demand for systems that are easy to use and can be used immediately, without the need for dedicated devices or special facilities. However, many current systems have difficulty providing real-time information without delay in response to user requests, and there is no established method for providing evacuation guidance information quickly and appropriately in the event of a disaster. Improving this situation is a challenge.
[0519] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0520] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users and searching the database based on the requests to acquire corresponding epicenter information, means for transmitting and displaying the acquired epicenter information to a terminal to provide it to the user, scheduling means for automatically acquiring epicenter information at specified time intervals, and means for providing evacuation information in real time when a disaster occurs. This makes it possible to provide earthquake information and evacuation information to users quickly and accurately in real time.
[0521] A "weather information provider" is an organization or institution that collects, analyzes, and makes weather data available to the public.
[0522] "Epicenter information" refers to detailed data such as the location, time, magnitude, and depth of the earthquake's epicenter.
[0523] "Scraping" is a method of programmatically obtaining and analyzing data on the web.
[0524] A "database" is a system that systematically stores data and manages it so that it can be searched and retrieved efficiently.
[0525] "User" means an individual or organization that uses the system.
[0526] A "request" is a query or request for information made by a user to a system.
[0527] A "server" is a computer system that responds to requests from clients over a network and provides services.
[0528] A "terminal" is a computer or device that is directly operated by a user.
[0529] A "scheduling means" is a function or mechanism for automatically executing tasks at specific time intervals.
[0530] "Evacuation information" refers to information that guides people to safe locations and instructs them on appropriate actions when a disaster occurs.
[0531] This invention relates to a system in which a server scrapes earthquake information from the websites of weather information providers at regular intervals, stores the acquired information in a database, and provides information in real time in response to user requests.
[0532] Specifically, the server uses a task scheduler to periodically send HTTP requests to the weather information provider's website. The HTML response obtained through this request is analyzed to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The database is managed using a database system such as SQLite.
[0533] When a user wants to know the "most recent epicenter information" on a device such as a smartphone or PC, they open the application and send a request. The request from this device is sent to a server, which searches the database for the most recent epicenter information and returns it in JSON format to the device. The device reads this information and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0534] Furthermore, when a large-scale earthquake occurs, the server crawls social media and news sites to collect local information and stores this information in the database. When a user sends a request to "know the local situation," the server also searches for and provides the latest information collected through the crawl. This allows users to quickly obtain not only the latest earthquake information, but also evacuation information and damage status.
[0535] The server uses Python to parse HTML using the BeautifulSoup library and saves the information in an SQLite database. It also uses Flask to build an API server to respond to user requests. It uses the Python schedule library for scheduling.
[0536] As a concrete example, if a magnitude 6.5 earthquake occurs in Tokyo, the server automatically retrieves this information from the website and stores it in an SQLite database. When a user sends a request for "latest earthquake information" via an application on their smartphone, the server immediately returns the latest information, allowing the user to check the earthquake information on their device. It can also provide users with evacuation information and information on the local situation.
[0537] An example prompt for a generative AI model is:
[0538] "Write a Python program to scrape earthquake information from the website of a weather information provider and notify users in real time. Store the information in an SQLite database and build an API server using Flask. Also, set up a scheduler to retrieve the information periodically."
[0539] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0540] Step 1:
[0541] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals.
[0542] Input: Task Scheduler trigger (time interval)
[0543] Data processing: Sending an HTTP request
[0544] Output: HTML response
[0545] Specific operation: The server uses Python's requests library to periodically send HTTP GET requests to the specified URL.
[0546] Step 2:
[0547] The server parses the HTML response it receives and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0548] Input: HTML response
[0549] Data processing: HTML parsing using BeautifulSoup
[0550] Output: Earthquake information (location, time, magnitude, depth of earthquake)
[0551] What it does: The server uses the BeautifulSoup library to parse the HTML and extract earthquake information from specific tags and classes.
[0552] Step 3:
[0553] The server stores the acquired epicenter information in a database.
[0554] Input: Epicenter information
[0555] Data processing: Insertion into database
[0556] Output: The epicenter information is saved in the database.
[0557] Specific operation: The server uses the SQLite library to insert the extracted epicenter information into an SQLite database.
[0558] Step 4:
[0559] The user requests "information on the most recent earthquake epicenter" from their smartphone or computer.
[0560] Input: User request
[0561] Data processing: Analysis of request information
[0562] Output: Request content
[0563] Specific operation: The user opens a dedicated app or web page and enters a request to know the "most recent epicenter information."
[0564] Step 5:
[0565] The server receives the user request and retrieves the latest epicenter information from the database.
[0566] Input: User request
[0567] Data processing: Database search
[0568] Output: Latest earthquake information
[0569] Specific operation: The server analyzes the received request and retrieves the most recent earthquake epicenter information from the SQLite database.
[0570] Step 6:
[0571] The server returns the acquired epicenter information to the user's device in JSON format.
[0572] Input: Latest epicenter information
[0573] Data processing: Conversion to JSON format
[0574] Output: JSON format data
[0575] Specific operation: The server converts the acquired data into JSON format using Python's json library and returns it to the user's device as an HTTP response.
[0576] Step 7:
[0577] The terminal displays the epicenter information received from the server to the user.
[0578] Input: JSON format data
[0579] Data processing: Data analysis and presentation
[0580] Output: Display of epicenter information
[0581] Specific operation: The user's device parses the JSON data and displays the earthquake information on the screen. This means that the latest earthquake information is provided visually to the user on a smartphone app or web page.
[0582] Step 8:
[0583] The server provides real-time evacuation information in the event of a disaster.
[0584] Input: Additional information stored in the database (e.g., information from social media sites, news sites)
[0585] Data processing: Crawling to acquire information and storing it in a database
[0586] Output: Evacuation information
[0587] Specific operation: When a large-scale earthquake occurs, the server crawls social media and news sites, collects evacuation information, stores it in a database, and provides this information upon user request.
[0588] Through the above steps, the server, terminal, and user each fulfill their respective roles, enabling the rapid and accurate provision of epicenter information and evacuation information in real time.
[0589] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0590] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests, combined with an emotion engine that recognizes user emotions.
[0591] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[0592] A user, for example, uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches and retrieves the latest epicenter information from its database. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0593] The present invention further incorporates an emotion engine to adjust the presentation of epicenter information according to the user's emotional state. The emotion engine analyzes emotions from the user's input, voice, and facial expressions. If the user is feeling stressed or scared, the emotion engine changes the display format of the epicenter information based on the analysis results.
[0594] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is then sent to the device in JSON format, which the device reads and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0595] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[0596] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[0597] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation information, enabling them to take appropriate action and providing information that suits the user's emotional state.In this way, the present invention is a system that quickly and accurately provides the epicenter and local information that users need, while at the same time providing flexible information that takes into account the user's emotional state.
[0598] The processing flow will be explained below.
[0599] Step 1:
[0600] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[0601] Step 2:
[0602] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0603] Step 3:
[0604] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[0605] Step 4:
[0606] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[0607] Step 5:
[0608] The device sends the user's request to the server as an HTTP request to the API endpoint.
[0609] Step 6:
[0610] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[0611] Step 7:
[0612] The server queries the database to obtain the required epicenter information.
[0613] Step 8:
[0614] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[0615] Step 9:
[0616] The emotion engine analyzes the user's facial expressions, voice, and inputs to assess their emotional state, using the device's built-in camera and microphone.
[0617] Step 10:
[0618] The device receives the analysis results of the emotion engine and determines the display format according to the user's emotional state. For example, if the user is feeling stressed, the device will reduce the amount of information displayed and provide earthquake information in a simplified format.
[0619] Step 11:
[0620] The device displays the epicenter information generated based on the analysis results to the user, and if necessary, additional safety information and evacuation advice may also be displayed.
[0621] Step 12:
[0622] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[0623] Step 13:
[0624] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[0625] Step 14:
[0626] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[0627] Example 2
[0628] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0629] In conventional earthquake information provision systems, it is important to provide users with appropriate information quickly. However, because they do not take into account the user's emotional state, there is a problem in that the information provided is insufficient for users who feel fear or anxiety, and they are unable to convey appropriate countermeasures. Furthermore, there is also the issue of quickly collecting local information and providing it to users when a large-scale earthquake occurs.
[0630] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0631] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users, searching the database based on the requests, and acquiring corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, and means for adjusting the display of information according to the user's emotional state using an emotion engine that analyzes the user's emotions. This makes it possible to provide epicenter information while taking the user's emotional state into consideration, and to quickly convey appropriate countermeasures and reassurance information to users who are feeling anxious or scared. Furthermore, when a large-scale earthquake occurs, local information can be quickly collected and provided to users.
[0632] "Weather data providers" are organizations or institutions that collect and analyze weather and disaster data and provide it to the public.
[0633] "Scraping" is a technique for automatically obtaining specific data from a website.
[0634] "Epicenter information" is a general term for specific data about earthquakes, such as the location and time of occurrence, magnitude, and depth of the epicenter.
[0635] A "database" is a system for efficiently storing, retrieving, and managing data.
[0636] A "request" is an action or content of a user requesting some information or service from the system.
[0637] An "emotion engine" is software or algorithms that analyze a user's emotional state based on their input, voice, facial expressions, etc.
[0638] A "task scheduler" is a system for automatically executing specific tasks or programs at regular intervals.
[0639] "Analysis" is the process of examining data or information in detail to understand its content and meaning.
[0640] "Adjustment" is the act of appropriately modifying information or behavior to suit specific conditions or requirements.
[0641] "JSON format" stands for JavaScript Object Notation and is a format for storing and exchanging data in text format.
[0642] This invention combines a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests with an emotion engine that recognizes user emotions.
[0643] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). Specifically, the server uses Python's requests module to send the HTTP requests and parses the HTML response it receives using BeautifulSoup. From the parsed data, it extracts information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The extracted data is then saved in a database management system such as MySQL or PostgreSQL. An ORM library such as sqlalchemy is used to insert the data into the database.
[0644] A user uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends an HTTP request to the server, which then analyzes the request. Based on the analysis results, the server searches and retrieves the most recent epicenter information from a database and returns it in JSON format to the device. The device then displays the received JSON data to the user. HTML and CSS are often used for display.
[0645] The system also incorporates an emotion engine that analyzes emotions from user input, voice, and facial expressions. The emotion engine uses software such as TensorFlow and OpenCV. The device sends data obtained using the user's camera and microphone to the emotion engine, which then analyzes the user's emotional state in real time. Based on the analysis results, the server adjusts the display format of information according to the user's emotional state. For example, if the user is feeling fear or stress, the server simplifies the display of information about the epicenter and adds reassurance information and evacuation advice.
[0646] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server retrieves the latest earthquake information from the database and sends it in JSON format to the device. The device analyzes the retrieved data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0647] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device adjusts the display of information about the earthquake's source, such as providing immediate information about the extent of the earthquake's impact, evacuation sites, and first aid procedures, to ease the user's anxiety.
[0648] A specific example of a prompt sentence is, "Please tell me the steps to take if I want to know the latest earthquake information using a smartphone app." This system responds quickly and accurately to such specific requests, providing information that takes into account the user's emotional state.
[0649] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0650] Step 1:
[0651] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). It uses the requests module to send the requests and receive HTML responses. The input is the HTTP request, and the output is the HTML response.
[0652] Step 2:
[0653] The server parses the received HTML response using BeautifulSoup. Specifically, it extracts the earthquake's location, time, magnitude, and epicenter depth from specific HTML tags and classes. The input is the HTML response, and the output is the extracted epicenter information (e.g., "Location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", "Depth: 10km").
[0654] Step 3:
[0655] The server converts the extracted epicenter information into dictionary format and stores it in a MySQL or PostgreSQL database using sqlalchemy. The input is the dictionary format of the epicenter information, and the output is the epicenter information stored in the database.
[0656] Step 4:
[0657] A user uses an application on a smartphone or computer to send a request from the device saying, "I want to know the most recent epicenter information." The input is the user's request, "I want to know the most recent epicenter information," and the output is sent to the server as an HTTP request.
[0658] Step 5:
[0659] The terminal sends a request from the user to the server as an HTTP request. The input is the request from the user, and the output is the HTTP request sent to the server.
[0660] Step 6:
[0661] The server analyzes the received HTTP request and searches the database for the latest earthquake source information. For example, it uses an SQL SELECT statement to execute a query such as "SELECT FROM earthquake_info ORDER BY time DESC LIMIT 1." The input is the HTTP request and the database contents, and the output is the latest earthquake source information.
[0662] Step 7:
[0663] The server converts the acquired epicenter information into JSON format and sends it to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data.
[0664] Step 8:
[0665] The terminal analyzes the received JSON data and displays information to the user, such as the epicenter, time of occurrence, magnitude, depth of the epicenter, etc. The input is the epicenter information in JSON format, and the output is the information to be displayed.
[0666] Step 9:
[0667] The device sends data obtained using the user's camera and microphone to the emotion engine, which then uses TensorFlow and OpenCV to analyze the user's emotional state in real time. The input is data obtained from the camera and microphone, and the output is the result of analyzing the user's emotions.
[0668] Step 10:
[0669] If the emotion engine analyzes the user's emotion as "fear" or "anxiety," the server simplifies the display of the epicenter information and adds reassurance information and evacuation advice. The input is the emotion analysis result, and the output is the adjusted epicenter information.
[0670] Step 11:
[0671] The server converts the adjusted epicenter information back into JSON format and sends it back to the terminal. The input is the adjusted epicenter information, and the output is JSON format data.
[0672] Step 12:
[0673] The device again analyzes the received JSON data and displays the adjusted information to the user. For example, it might display information such as "Earthquake location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", and "Please evacuate immediately". The input is the adjusted JSON data, and the output is the adjusted information displayed to the user.
[0674] (Application example 2)
[0675] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0676] Conventional earthquake information systems simply provide users with information about the epicenter, and lack consideration for the fear and stress felt by users. Furthermore, there is a need for systems that not only provide the latest epicenter information in real time, but also properly communicate local conditions and evacuation information in the event of a large-scale earthquake. To address these issues, it is necessary to provide a system that reduces the mental burden on users and allows them to receive information quickly and with peace of mind.
[0677] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0678] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, means for analyzing the user's emotional state, and means for adjusting the display of the epicenter information based on the analysis results. This enables flexible information provision according to the user's emotional state and rapid provision of local information when a large-scale earthquake occurs.
[0679] A "weather information provider" is an organization that collects and provides information related to weather and natural disasters such as earthquakes.
[0680] "Epicenter information" refers to information about the location, time, magnitude, and depth of the earthquake's epicenter.
[0681] "Scraping" is a technique for automatically obtaining specific information from a web page.
[0682] A "database" is a system for systematically storing and managing information.
[0683] A "request" is an act by a user requesting specific information from the system.
[0684] "Emotional state" refers to the user's psychological state, including emotions such as fear and stress.
[0685] "Analysis" is the act of examining data or information in detail to clarify its meaning.
[0686] "Adjusting the display" refers to changing the way information is displayed depending on the user's situation.
[0687] The present invention relates to a system for scraping earthquake information from the websites of weather information providers and storing the acquired information in a database. Specific embodiments will be described below.
[0688] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The HTML response obtained through this request is parsed to extract earthquake epicenter information such as the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The main software used is Python for scraping and database operations, and SQLite is used as the database.
[0689] For example, a user can use a smartphone to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0690] A distinctive feature of this invention is the incorporation of an emotion engine. The emotion engine analyzes emotions from user input (voice, facial expressions). For example, Microsoft Azure's Emotion API can be used. If the emotion engine determines that the user is feeling fear or stress, it adjusts the format of the epicenter information displayed on the device screen. Specifically, it can simplify the epicenter information and display additional reassurance information and evacuation advice. This can ease the user's anxiety and encourage appropriate behavior.
[0691] For example, if a user wants to get "information on the latest earthquakes" using a smartphone, they open the app and press the "Latest Earthquake Information" button, and the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0692] Additionally, if the emotion engine analyzes the user's facial expressions using a camera and detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[0693] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[0694] Get recent earthquake data.
[0695] Analyze user sentiment.
[0696] If they are feeling scared or stressed, provide reassurance information.
[0697] In this way, the present invention is a system that quickly and accurately provides the epicenter information and local information required by the user, while at the same time realizing flexible information provision that takes into account the emotional state of the user.
[0698] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0699] Step 1:
[0700] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The input is a notification from the task scheduler, and the output is the HTML response it receives. After receiving the HTML response, the server parses it using a library such as BeautifulSoup to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth.
[0701] Step 2:
[0702] The server stores the extracted epicenter information in a database. The input is the epicenter information obtained in step 1, and the output is the epicenter information stored in the database. The server stores the information using a database management system such as SQLite.
[0703] Step 3:
[0704] A user uses a smartphone to send a request from the device saying, "I want to know the latest epicenter information." The input is the user's request, and the output is the request sent to the server. The device sends an HTTP request to the server.
[0705] Step 4:
[0706] The server analyzes the received user request and retrieves the latest earthquake information from the database. The input is the user request and the database, and the output is the retrieved latest earthquake information in JSON format.
[0707] Step 5:
[0708] The server sends the acquired epicenter information to the terminal. The input is the epicenter information acquired in step 4, and the output is sent to the terminal. The server returns JSON data to the terminal as an HTTP response.
[0709] Step 6:
[0710] The terminal displays the epicenter information received from the server to the user. The input is JSON data from the server, and the output is the display of the epicenter information on the screen. The terminal analyzes the received data and displays it on the screen.
[0711] Step 7:
[0712] The device detects the user's emotional state using a camera or microphone and sends it to the emotion engine. The input is the user's facial expression and voice data, and the output is sent to the emotion engine. The device acquires data from the camera or microphone and requests the emotion engine to analyze it.
[0713] Step 8:
[0714] The emotion engine analyzes the user's emotional state. The input is facial expression and voice data from the device, and the output is the analysis results. The emotion engine performs its analysis using, for example, Microsoft Azure's Emotion API.
[0715] Step 9:
[0716] The device receives the analysis results from the emotion engine and adjusts the display format. The input is the analysis results of the emotion engine, and the output is the adjusted display. If the user is feeling fear or stress, the device will simplify the display of earthquake source information and add reassurance information and evacuation advice.
[0717] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[0718] Get recent earthquake data.
[0719] Analyze user sentiment.
[0720] If they are feeling scared or stressed, provide reassurance information.
[0721] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0722] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0723] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.
[0724] [Third embodiment]
[0725] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0726] 5, the data processing system 310 includes the data processing device 12 and a headset type terminal 314. An example of the data processing device 12 is a server.
[0727] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0728] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.
[0729] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0730] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0731] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0732] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0733] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0734] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0735] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0736] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."
[0737] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[0738] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[0739] For example, a user sends a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0740] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." When the user opens the app and presses the "information on the most recent earthquakes" button, the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0741] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[0742] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation, enabling them to take appropriate action.In this way, the present invention quickly and accurately provides users with the epicenter and local information they need.
[0743] The processing flow will be explained below.
[0744] Step 1:
[0745] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[0746] Step 2:
[0747] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0748] Step 3:
[0749] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[0750] Step 4:
[0751] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[0752] Step 5:
[0753] The device sends the user's request to the server as an HTTP request to the API endpoint.
[0754] Step 6:
[0755] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[0756] Step 7:
[0757] The server queries the database to obtain the required epicenter information.
[0758] Step 8:
[0759] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[0760] Step 9:
[0761] The terminal analyzes the received JSON data and displays the information in a format that is easy for the user to view (e.g., table or card format).
[0762] Step 10:
[0763] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[0764] Step 11:
[0765] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[0766] Step 12:
[0767] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[0768] Example 1
[0769] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0770] Conventional earthquake information systems take time to acquire and provide earthquake information, making it difficult to provide users with earthquake information in real time. Furthermore, many systems incur high costs for acquiring and analyzing earthquake information, creating a need for an efficient, low-cost method for providing earthquake information. Furthermore, a system is needed that can quickly and easily provide the latest earthquake information or earthquake information for specific locations in response to user requests.
[0771] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0772] In this invention, the server includes means for scraping and acquiring epicenter information from the weather information provider's website, means for saving the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for sending the acquired epicenter information to the user's terminal in JSON format and displaying it, means including a task scheduler for periodically sending HTTP requests to the weather information provider's website, and HTML parsing means for analyzing the epicenter information. This makes it possible to acquire epicenter information efficiently in real time and provide it to the user promptly.
[0773] "Weather information providers" are public or private organizations that provide information on earthquakes and weather.
[0774] "Scraping" is a technique for automatically extracting specific information from a website.
[0775] "Epicenter information" refers to detailed information such as the location where the earthquake occurred, the time of occurrence, magnitude, and depth of the epicenter.
[0776] A "database" is a system for efficiently storing, managing, and searching acquired data.
[0777] A "user request" is an operation or inquiry by a user requesting specific information from the system.
[0778] A "task scheduler" is a software function that automatically executes specific tasks periodically.
[0779] An "HTTP request" is a request that a client (in this case, a server) sends to a website to obtain data.
[0780] An "HTML response" is data containing the content of a web page returned from a web server to a client.
[0781] "JSON format" is an abbreviation for JavaScript Object Notation, and is a lightweight data format for exchanging data.
[0782] A "terminal" is a device (e.g., a smartphone or PC) that a user uses to access the system.
[0783] "HTML parsing" is the process of analyzing an HTML document and extracting the necessary information.
[0784] "Latest epicenter information" refers to information on the occurrence of the most recent earthquake.
[0785] "Fixed-point epicenter information" refers to information on earthquake occurrences at specific locations.
[0786] This invention is a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[0787] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server uses a task scheduler such as a Linux cron job. The server retrieves the HTML response obtained through the HTTP request using the requests library and parses it using an HTML parsing library such as BeautifulSoup.
[0788] As a specific example, information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth, is extracted from the HTML response. The information obtained in this way is stored in a database such as MySQL by the server.
[0789] The user uses a device to send a request saying, "I want to know the latest earthquake information." When the user opens the smartphone app and presses the "Latest Earthquake Information" button, the device sends this request to the server. The device communicates with the server via an HTTP request.
[0790] The server analyzes the received request and retrieves the latest epicenter information from the database. The information is returned to the terminal in JSON format. The terminal analyzes the returned JSON data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0791] Additionally, the server collects real-time local information by crawling field surveys, news sites, and social networking services. In the event of a major earthquake, this additional information is also stored in the database and made available upon user request.
[0792] Example prompt sentences
[0793] Prompt sentence for collecting weather information
[0794] Update weather data from {website_url} at {time_interval}.
[0795] Prompt text for providing earthquake information to users
[0796] Provide the latest earthquake information to the user based on the request.
[0797] This system allows users to quickly obtain not only the latest information on the epicenter, but also information on the extent of damage and evacuation, enabling them to take appropriate action.
[0798] The system uses common software and hardware such as Linux, requests, BeautifulSoup, and MySQL, allowing it to provide earthquake information efficiently and cost-effectively.
[0799] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0800] Step 1:
[0801] The server uses a task scheduler to set up periodic tasks. For example, a Linux cron job is used as a task scheduler. The server uses this task to access the weather information provider's website at regular intervals. The input is the task scheduler settings, and the output is the periodic task execution. Specifically, the server sets up the following cron job:
[0802] (Example: 0 / usr / bin / python3 / path / to / scrape_script.py)
[0803] Step 2:
[0804] The server sends an HTTP request to the weather information provider's website according to the task scheduler. The server uses the requests library to access the website and get the HTML response. The input is the HTTP request, and the output is the HTML response. Specifically, the server sends the following request:
[0805] python
[0806] response = requests.get('https: / / example.com / earthquake')
[0807] Step 3:
[0808] The server analyzes the HTML response it receives. It uses BeautifulSoup to parse the response and extract the necessary epicenter information. The input is the HTML response, and the output is epicenter information (earthquake occurrence location, occurrence time, magnitude, and epicenter depth). Specifically, the information is extracted as follows:
[0809] python
[0810] soup = BeautifulSoup(response.content, 'html.parser')
[0811] location = soup.find('div', class_='location').text
[0812] event_time = soup.find('div', class_='time').text
[0813] magnitude = float(soup.find('div', class_='magnitude').text)
[0814] depth = float(soup.find('div', class_='depth').text)
[0815] Step 4:
[0816] The server stores the extracted epicenter information in a database. The server uses a database system such as MySQL to store the information permanently. The input is the epicenter information, and the output is the stored data. Specifically, the data is stored as follows:
[0817] python
[0818] db = mysql.connector.connect(
[0819] host="localhost",
[0820] user="user",
[0821] password="password",
[0822] database="earthquake_db"
[0823] )
[0824] cursor = db.cursor()
[0825] sql = "INSERT INTO earthquake_info (location, event_time, magnitude, depth) VALUES (%s, %s, %s, %s)"
[0826] values = (location, event_time, magnitude, depth)
[0827] cursor.execute(sql, values)
[0828] db.commit()
[0829] Step 5:
[0830] The user uses a device to send a request saying, "I want to know the latest earthquake information." The input is the user's request, and the output is the transmission of the request data. Specifically, the user presses the "Latest Earthquake Information" button on the smartphone app.
[0831] Step 6:
[0832] The terminal sends the user's request to the server. The terminal sends information to the server through an HTTP request. The input is the user's request, and the output is the request data sent to the server. Specifically, the request is sent as follows:
[0833] javascript
[0834] fetch('https: / / example.com / api / latest-earthquake')
[0835] .then(response => response.json())
[0836] .then(data => {
[0837] / / Handle data
[0838] });
[0839] Step 7:
[0840] The server analyzes the received request and retrieves the latest epicenter information from the database. The input is the user's request and the database, and the output is the latest epicenter information. Specifically, the server executes the query as follows:
[0841] python
[0842] sql = "SELECT FROM earthquake_info ORDER BY event_time DESC LIMIT 1"
[0843] cursor.execute(sql)
[0844] result = cursor.fetchone()
[0845] Step 8:
[0846] The server returns the acquired information in JSON format to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data. Specifically, the server converts the information and returns it as follows:
[0847] python
[0848] data = {
[0849] 'location': result[1],
[0850] 'event_time': result[2],
[0851] 'magnitude': result[3],
[0852] 'depth': result[4]
[0853] }
[0854] return jsonify(data)
[0855] Step 9:
[0856] The terminal parses the received JSON data and displays it to the user. The input is the epicenter information in JSON format, and the output is the information to be displayed to the user. Specifically, the terminal parses the data and displays it on the screen as follows:
[0857] javascript
[0858] fetch('https: / / example.com / api / latest-earthquake')
[0859] .then(response => response.json())
[0860] .then(data => {
[0861] document.getElementById('location').innerText = data.location;
[0862] document.getElementById('event_time').innerText = data.event_time;
[0863] document.getElementById('magnitude').innerText = data.magnitude;
[0864] document.getElementById('depth').innerText = data.depth;
[0865] });
[0866] (Application example 1)
[0867] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0868] In recent years, the importance of real-time earthquake monitoring and rapid information sharing has increased. There is a demand for systems that are easy to use and can be used immediately, without the need for dedicated devices or special facilities. However, many current systems have difficulty providing real-time information without delay in response to user requests, and there is no established method for providing evacuation guidance information quickly and appropriately in the event of a disaster. Improving this situation is a challenge.
[0869] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0870] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users and searching the database based on the requests to acquire corresponding epicenter information, means for transmitting and displaying the acquired epicenter information to a terminal to provide it to the user, scheduling means for automatically acquiring epicenter information at specified time intervals, and means for providing evacuation information in real time when a disaster occurs. This makes it possible to provide earthquake information and evacuation information to users quickly and accurately in real time.
[0871] A "weather information provider" is an organization or institution that collects, analyzes, and makes weather data available to the public.
[0872] "Epicenter information" refers to detailed data such as the location, time, magnitude, and depth of the earthquake's epicenter.
[0873] "Scraping" is a method of programmatically obtaining and analyzing data on the web.
[0874] A "database" is a system that systematically stores data and manages it so that it can be searched and retrieved efficiently.
[0875] "User" means an individual or organization that uses the system.
[0876] A "request" is a query or request for information made by a user to a system.
[0877] A "server" is a computer system that responds to requests from clients over a network and provides services.
[0878] A "terminal" is a computer or device that is directly operated by a user.
[0879] A "scheduling means" is a function or mechanism for automatically executing tasks at specific time intervals.
[0880] "Evacuation information" refers to information that guides people to safe locations and instructs them on appropriate actions when a disaster occurs.
[0881] This invention relates to a system in which a server scrapes earthquake information from the websites of weather information providers at regular intervals, stores the acquired information in a database, and provides information in real time in response to user requests.
[0882] Specifically, the server uses a task scheduler to periodically send HTTP requests to the weather information provider's website. The HTML response obtained through this request is analyzed to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The database is managed using a database system such as SQLite.
[0883] When a user wants to know the "most recent epicenter information" on a device such as a smartphone or PC, they open the application and send a request. The request from this device is sent to a server, which searches the database for the most recent epicenter information and returns it in JSON format to the device. The device reads this information and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0884] Furthermore, when a large-scale earthquake occurs, the server crawls social media and news sites to collect local information and stores this information in the database. When a user sends a request to "know the local situation," the server also searches for and provides the latest information collected through the crawl. This allows users to quickly obtain not only the latest earthquake information, but also evacuation information and damage status.
[0885] The server uses Python to parse HTML using the BeautifulSoup library and saves the information in an SQLite database. It also uses Flask to build an API server to respond to user requests. It uses the Python schedule library for scheduling.
[0886] As a concrete example, if a magnitude 6.5 earthquake occurs in Tokyo, the server automatically retrieves this information from the website and stores it in an SQLite database. When a user sends a request for "latest earthquake information" via an application on their smartphone, the server immediately returns the latest information, allowing the user to check the earthquake information on their device. It can also provide users with evacuation information and information on the local situation.
[0887] An example prompt for a generative AI model is:
[0888] "Write a Python program to scrape earthquake information from the website of a weather information provider and notify users in real time. Store the information in an SQLite database and build an API server using Flask. Also, set up a scheduler to retrieve the information periodically."
[0889] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0890] Step 1:
[0891] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals.
[0892] Input: Task Scheduler trigger (time interval)
[0893] Data processing: Sending an HTTP request
[0894] Output: HTML response
[0895] Specific operation: The server uses Python's requests library to periodically send HTTP GET requests to the specified URL.
[0896] Step 2:
[0897] The server parses the HTML response it receives and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0898] Input: HTML response
[0899] Data processing: HTML parsing using BeautifulSoup
[0900] Output: Earthquake information (location, time, magnitude, depth of earthquake)
[0901] What it does: The server uses the BeautifulSoup library to parse the HTML and extract earthquake information from specific tags and classes.
[0902] Step 3:
[0903] The server stores the acquired epicenter information in a database.
[0904] Input: Epicenter information
[0905] Data processing: Insertion into database
[0906] Output: The epicenter information is saved in the database.
[0907] Specific operation: The server uses the SQLite library to insert the extracted epicenter information into an SQLite database.
[0908] Step 4:
[0909] The user requests "information on the most recent earthquake epicenter" from their smartphone or computer.
[0910] Input: User request
[0911] Data processing: Analysis of request information
[0912] Output: Request content
[0913] Specific operation: The user opens a dedicated app or web page and enters a request to know the "most recent epicenter information."
[0914] Step 5:
[0915] The server receives the user request and retrieves the latest epicenter information from the database.
[0916] Input: User request
[0917] Data processing: Database search
[0918] Output: Latest earthquake information
[0919] Specific operation: The server analyzes the received request and retrieves the most recent earthquake epicenter information from the SQLite database.
[0920] Step 6:
[0921] The server returns the acquired epicenter information to the user's device in JSON format.
[0922] Input: Latest epicenter information
[0923] Data processing: Conversion to JSON format
[0924] Output: JSON format data
[0925] Specific operation: The server converts the acquired data into JSON format using Python's json library and returns it to the user's device as an HTTP response.
[0926] Step 7:
[0927] The terminal displays the epicenter information received from the server to the user.
[0928] Input: JSON format data
[0929] Data processing: Data analysis and presentation
[0930] Output: Display of epicenter information
[0931] Specific operation: The user's device parses the JSON data and displays the earthquake information on the screen. This means that the latest earthquake information is provided visually to the user on a smartphone app or web page.
[0932] Step 8:
[0933] The server provides real-time evacuation information in the event of a disaster.
[0934] Input: Additional information stored in the database (e.g., information from social media sites, news sites)
[0935] Data processing: Crawling to acquire information and storing it in a database
[0936] Output: Evacuation information
[0937] Specific operation: When a large-scale earthquake occurs, the server crawls social media and news sites, collects evacuation information, stores it in a database, and provides this information upon user request.
[0938] Through the above steps, the server, terminal, and user each fulfill their respective roles, enabling the rapid and accurate provision of epicenter information and evacuation information in real time.
[0939] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0940] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests, combined with an emotion engine that recognizes user emotions.
[0941] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[0942] A user, for example, uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches and retrieves the latest epicenter information from its database. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[0943] The present invention further incorporates an emotion engine to adjust the presentation of epicenter information according to the user's emotional state. The emotion engine analyzes emotions from the user's input, voice, and facial expressions. If the user is feeling stressed or scared, the emotion engine changes the display format of the epicenter information based on the analysis results.
[0944] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is then sent to the device in JSON format, which the device reads and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0945] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[0946] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[0947] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation information, enabling them to take appropriate action and providing information that suits the user's emotional state.In this way, the present invention is a system that quickly and accurately provides the epicenter and local information that users need, while at the same time providing flexible information that takes into account the user's emotional state.
[0948] The processing flow will be explained below.
[0949] Step 1:
[0950] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[0951] Step 2:
[0952] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[0953] Step 3:
[0954] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[0955] Step 4:
[0956] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[0957] Step 5:
[0958] The device sends the user's request to the server as an HTTP request to the API endpoint.
[0959] Step 6:
[0960] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[0961] Step 7:
[0962] The server queries the database to obtain the required epicenter information.
[0963] Step 8:
[0964] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[0965] Step 9:
[0966] The emotion engine analyzes the user's facial expressions, voice, and inputs to assess their emotional state, using the device's built-in camera and microphone.
[0967] Step 10:
[0968] The device receives the analysis results of the emotion engine and determines the display format according to the user's emotional state. For example, if the user is feeling stressed, the device will reduce the amount of information displayed and provide earthquake information in a simplified format.
[0969] Step 11:
[0970] The device displays the epicenter information generated based on the analysis results to the user, and if necessary, additional safety information and evacuation advice may also be displayed.
[0971] Step 12:
[0972] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[0973] Step 13:
[0974] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[0975] Step 14:
[0976] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[0977] Example 2
[0978] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0979] In conventional earthquake information provision systems, it is important to provide users with appropriate information quickly. However, because they do not take into account the user's emotional state, there is a problem in that the information provided is insufficient for users who feel fear or anxiety, and they are unable to convey appropriate countermeasures. Furthermore, there is also the issue of quickly collecting local information and providing it to users when a large-scale earthquake occurs.
[0980] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0981] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users, searching the database based on the requests, and acquiring corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, and means for adjusting the display of information according to the user's emotional state using an emotion engine that analyzes the user's emotions. This makes it possible to provide epicenter information while taking the user's emotional state into consideration, and to quickly convey appropriate countermeasures and reassurance information to users who are feeling anxious or scared. Furthermore, when a large-scale earthquake occurs, local information can be quickly collected and provided to users.
[0982] "Weather data providers" are organizations or institutions that collect and analyze weather and disaster data and provide it to the public.
[0983] "Scraping" is a technique for automatically obtaining specific data from a website.
[0984] "Epicenter information" is a general term for specific data about earthquakes, such as the location and time of occurrence, magnitude, and depth of the epicenter.
[0985] A "database" is a system for efficiently storing, retrieving, and managing data.
[0986] A "request" is an action or content of a user requesting some information or service from the system.
[0987] An "emotion engine" is software or algorithms that analyze a user's emotional state based on their input, voice, facial expressions, etc.
[0988] A "task scheduler" is a system for automatically executing specific tasks or programs at regular intervals.
[0989] "Analysis" is the process of examining data or information in detail to understand its content and meaning.
[0990] "Adjustment" is the act of appropriately modifying information or behavior to suit specific conditions or requirements.
[0991] "JSON format" stands for JavaScript Object Notation and is a format for storing and exchanging data in text format.
[0992] This invention combines a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests with an emotion engine that recognizes user emotions.
[0993] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). Specifically, the server uses Python's requests module to send the HTTP requests and parses the HTML response it receives using BeautifulSoup. From the parsed data, it extracts information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The extracted data is then saved in a database management system such as MySQL or PostgreSQL. An ORM library such as sqlalchemy is used to insert the data into the database.
[0994] A user uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends an HTTP request to the server, which then analyzes the request. Based on the analysis results, the server searches and retrieves the most recent epicenter information from a database and returns it in JSON format to the device. The device then displays the received JSON data to the user. HTML and CSS are often used for display.
[0995] The system also incorporates an emotion engine that analyzes emotions from user input, voice, and facial expressions. The emotion engine uses software such as TensorFlow and OpenCV. The device sends data obtained using the user's camera and microphone to the emotion engine, which then analyzes the user's emotional state in real time. Based on the analysis results, the server adjusts the display format of information according to the user's emotional state. For example, if the user is feeling fear or stress, the server simplifies the display of information about the epicenter and adds reassurance information and evacuation advice.
[0996] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server retrieves the latest earthquake information from the database and sends it in JSON format to the device. The device analyzes the retrieved data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[0997] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device adjusts the display of information about the earthquake's source, such as providing immediate information about the extent of the earthquake's impact, evacuation sites, and first aid procedures, to ease the user's anxiety.
[0998] A specific example of a prompt sentence is, "Please tell me the steps to take if I want to know the latest earthquake information using a smartphone app." This system responds quickly and accurately to such specific requests, providing information that takes into account the user's emotional state.
[0999] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1000] Step 1:
[1001] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). It uses the requests module to send the requests and receive HTML responses. The input is the HTTP request, and the output is the HTML response.
[1002] Step 2:
[1003] The server parses the received HTML response using BeautifulSoup. Specifically, it extracts the earthquake's location, time, magnitude, and epicenter depth from specific HTML tags and classes. The input is the HTML response, and the output is the extracted epicenter information (e.g., "Location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", "Depth: 10km").
[1004] Step 3:
[1005] The server converts the extracted epicenter information into dictionary format and stores it in a MySQL or PostgreSQL database using sqlalchemy. The input is the dictionary format of the epicenter information, and the output is the epicenter information stored in the database.
[1006] Step 4:
[1007] A user uses an application on a smartphone or computer to send a request from the device saying, "I want to know the most recent epicenter information." The input is the user's request, "I want to know the most recent epicenter information," and the output is sent to the server as an HTTP request.
[1008] Step 5:
[1009] The terminal sends a request from the user to the server as an HTTP request. The input is the request from the user, and the output is the HTTP request sent to the server.
[1010] Step 6:
[1011] The server analyzes the received HTTP request and searches the database for the latest earthquake source information. For example, it uses an SQL SELECT statement to execute a query such as "SELECT FROM earthquake_info ORDER BY time DESC LIMIT 1." The input is the HTTP request and the database contents, and the output is the latest earthquake source information.
[1012] Step 7:
[1013] The server converts the acquired epicenter information into JSON format and sends it to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data.
[1014] Step 8:
[1015] The terminal analyzes the received JSON data and displays information to the user, such as the epicenter, time of occurrence, magnitude, depth of the epicenter, etc. The input is the epicenter information in JSON format, and the output is the information to be displayed.
[1016] Step 9:
[1017] The device sends data obtained using the user's camera and microphone to the emotion engine, which then uses TensorFlow and OpenCV to analyze the user's emotional state in real time. The input is data obtained from the camera and microphone, and the output is the result of analyzing the user's emotions.
[1018] Step 10:
[1019] If the emotion engine analyzes the user's emotion as "fear" or "anxiety," the server simplifies the display of the epicenter information and adds reassurance information and evacuation advice. The input is the emotion analysis result, and the output is the adjusted epicenter information.
[1020] Step 11:
[1021] The server converts the adjusted epicenter information back into JSON format and sends it back to the terminal. The input is the adjusted epicenter information, and the output is JSON format data.
[1022] Step 12:
[1023] The device again analyzes the received JSON data and displays the adjusted information to the user. For example, it might display information such as "Earthquake location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", and "Please evacuate immediately". The input is the adjusted JSON data, and the output is the adjusted information displayed to the user.
[1024] (Application example 2)
[1025] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1026] Conventional earthquake information systems simply provide users with information about the epicenter, and lack consideration for the fear and stress felt by users. Furthermore, there is a need for systems that not only provide the latest epicenter information in real time, but also properly communicate local conditions and evacuation information in the event of a large-scale earthquake. To address these issues, it is necessary to provide a system that reduces the mental burden on users and allows them to receive information quickly and with peace of mind.
[1027] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1028] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, means for analyzing the user's emotional state, and means for adjusting the display of the epicenter information based on the analysis results. This enables flexible information provision according to the user's emotional state and rapid provision of local information when a large-scale earthquake occurs.
[1029] A "weather information provider" is an organization that collects and provides information related to weather and natural disasters such as earthquakes.
[1030] "Epicenter information" refers to information about the location, time, magnitude, and depth of the earthquake's epicenter.
[1031] "Scraping" is a technique for automatically obtaining specific information from a web page.
[1032] A "database" is a system for systematically storing and managing information.
[1033] A "request" is an act by a user requesting specific information from the system.
[1034] "Emotional state" refers to the user's psychological state, including emotions such as fear and stress.
[1035] "Analysis" is the act of examining data or information in detail to clarify its meaning.
[1036] "Adjusting the display" refers to changing the way information is displayed depending on the user's situation.
[1037] The present invention relates to a system for scraping earthquake information from the websites of weather information providers and storing the acquired information in a database. Specific embodiments will be described below.
[1038] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The HTML response obtained through this request is parsed to extract earthquake epicenter information such as the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The main software used is Python for scraping and database operations, and SQLite is used as the database.
[1039] For example, a user can use a smartphone to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[1040] A distinctive feature of this invention is the incorporation of an emotion engine. The emotion engine analyzes emotions from user input (voice, facial expressions). For example, Microsoft Azure's Emotion API can be used. If the emotion engine determines that the user is feeling fear or stress, it adjusts the format of the epicenter information displayed on the device screen. Specifically, it can simplify the epicenter information and display additional reassurance information and evacuation advice. This can ease the user's anxiety and encourage appropriate behavior.
[1041] For example, if a user wants to get "information on the latest earthquakes" using a smartphone, they open the app and press the "Latest Earthquake Information" button, and the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[1042] Additionally, if the emotion engine analyzes the user's facial expressions using a camera and detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[1043] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[1044] Get recent earthquake data.
[1045] Analyze user sentiment.
[1046] If they are feeling scared or stressed, provide reassurance information.
[1047] In this way, the present invention is a system that quickly and accurately provides the epicenter information and local information required by the user, while at the same time realizing flexible information provision that takes into account the emotional state of the user.
[1048] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1049] Step 1:
[1050] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The input is a notification from the task scheduler, and the output is the HTML response it receives. After receiving the HTML response, the server parses it using a library such as BeautifulSoup to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth.
[1051] Step 2:
[1052] The server stores the extracted epicenter information in a database. The input is the epicenter information obtained in step 1, and the output is the epicenter information stored in the database. The server stores the information using a database management system such as SQLite.
[1053] Step 3:
[1054] A user uses a smartphone to send a request from the device saying, "I want to know the latest epicenter information." The input is the user's request, and the output is the request sent to the server. The device sends an HTTP request to the server.
[1055] Step 4:
[1056] The server analyzes the received user request and retrieves the latest earthquake information from the database. The input is the user request and the database, and the output is the retrieved latest earthquake information in JSON format.
[1057] Step 5:
[1058] The server sends the acquired epicenter information to the terminal. The input is the epicenter information acquired in step 4, and the output is sent to the terminal. The server returns JSON data to the terminal as an HTTP response.
[1059] Step 6:
[1060] The terminal displays the epicenter information received from the server to the user. The input is JSON data from the server, and the output is the display of the epicenter information on the screen. The terminal analyzes the received data and displays it on the screen.
[1061] Step 7:
[1062] The device detects the user's emotional state using a camera or microphone and sends it to the emotion engine. The input is the user's facial expression and voice data, and the output is sent to the emotion engine. The device acquires data from the camera or microphone and requests the emotion engine to analyze it.
[1063] Step 8:
[1064] The emotion engine analyzes the user's emotional state. The input is facial expression and voice data from the device, and the output is the analysis results. The emotion engine performs its analysis using, for example, Microsoft Azure's Emotion API.
[1065] Step 9:
[1066] The device receives the analysis results from the emotion engine and adjusts the display format. The input is the analysis results of the emotion engine, and the output is the adjusted display. If the user is feeling fear or stress, the device will simplify the display of earthquake source information and add reassurance information and evacuation advice.
[1067] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[1068] Get recent earthquake data.
[1069] Analyze user sentiment.
[1070] If they are feeling scared or stressed, provide reassurance information.
[1071] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[1072] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1073] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.
[1074] [Fourth embodiment]
[1075] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1076] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.
[1077] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[1078] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.
[1079] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[1080] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[1081] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[1082] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.
[1083] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1084] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1085] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1086] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1087] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1088] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[1089] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[1090] For example, a user sends a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[1091] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." When the user opens the app and presses the "information on the most recent earthquakes" button, the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[1092] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[1093] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation, enabling them to take appropriate action.In this way, the present invention quickly and accurately provides users with the epicenter and local information they need.
[1094] The processing flow will be explained below.
[1095] Step 1:
[1096] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[1097] Step 2:
[1098] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[1099] Step 3:
[1100] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[1101] Step 4:
[1102] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[1103] Step 5:
[1104] The device sends the user's request to the server as an HTTP request to the API endpoint.
[1105] Step 6:
[1106] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[1107] Step 7:
[1108] The server queries the database to obtain the required epicenter information.
[1109] Step 8:
[1110] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[1111] Step 9:
[1112] The terminal analyzes the received JSON data and displays the information in a format that is easy for the user to view (e.g., table or card format).
[1113] Step 10:
[1114] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[1115] Step 11:
[1116] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[1117] Step 12:
[1118] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[1119] Example 1
[1120] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1121] Conventional earthquake information systems take time to acquire and provide earthquake information, making it difficult to provide users with earthquake information in real time. Furthermore, many systems incur high costs for acquiring and analyzing earthquake information, creating a need for an efficient, low-cost method for providing earthquake information. Furthermore, a system is needed that can quickly and easily provide the latest earthquake information or earthquake information for specific locations in response to user requests.
[1122] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1123] In this invention, the server includes means for scraping and acquiring epicenter information from the weather information provider's website, means for saving the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for sending the acquired epicenter information to the user's terminal in JSON format and displaying it, means including a task scheduler for periodically sending HTTP requests to the weather information provider's website, and HTML parsing means for analyzing the epicenter information. This makes it possible to acquire epicenter information efficiently in real time and provide it to the user promptly.
[1124] "Weather information providers" are public or private organizations that provide information on earthquakes and weather.
[1125] "Scraping" is a technique for automatically extracting specific information from a website.
[1126] "Epicenter information" refers to detailed information such as the location where the earthquake occurred, the time of occurrence, magnitude, and depth of the epicenter.
[1127] A "database" is a system for efficiently storing, managing, and searching acquired data.
[1128] A "user request" is an operation or inquiry by a user requesting specific information from the system.
[1129] A "task scheduler" is a software function that automatically executes specific tasks periodically.
[1130] An "HTTP request" is a request that a client (in this case, a server) sends to a website to obtain data.
[1131] An "HTML response" is data containing the content of a web page returned from a web server to a client.
[1132] "JSON format" is an abbreviation for JavaScript Object Notation, and is a lightweight data format for exchanging data.
[1133] A "terminal" is a device (e.g., a smartphone or PC) that a user uses to access the system.
[1134] "HTML parsing" is the process of analyzing an HTML document and extracting the necessary information.
[1135] "Latest epicenter information" refers to information on the occurrence of the most recent earthquake.
[1136] "Fixed-point epicenter information" refers to information on earthquake occurrences at specific locations.
[1137] This invention is a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests.
[1138] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server uses a task scheduler such as a Linux cron job. The server retrieves the HTML response obtained through the HTTP request using the requests library and parses it using an HTML parsing library such as BeautifulSoup.
[1139] As a specific example, information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth, is extracted from the HTML response. The information obtained in this way is stored in a database such as MySQL by the server.
[1140] The user uses a device to send a request saying, "I want to know the latest earthquake information." When the user opens the smartphone app and presses the "Latest Earthquake Information" button, the device sends this request to the server. The device communicates with the server via an HTTP request.
[1141] The server analyzes the received request and retrieves the latest epicenter information from the database. The information is returned to the terminal in JSON format. The terminal analyzes the returned JSON data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[1142] Additionally, the server collects real-time local information by crawling field surveys, news sites, and social networking services. In the event of a major earthquake, this additional information is also stored in the database and made available upon user request.
[1143] Example prompt sentences
[1144] Prompt sentence for collecting weather information
[1145] Update weather data from {website_url} at {time_interval}.
[1146] Prompt text for providing earthquake information to users
[1147] Provide the latest earthquake information to the user based on the request.
[1148] This system allows users to quickly obtain not only the latest information on the epicenter, but also information on the extent of damage and evacuation, enabling them to take appropriate action.
[1149] The system uses common software and hardware such as Linux, requests, BeautifulSoup, and MySQL, allowing it to provide earthquake information efficiently and cost-effectively.
[1150] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1151] Step 1:
[1152] The server uses a task scheduler to set up periodic tasks. For example, a Linux cron job is used as a task scheduler. The server uses this task to access the weather information provider's website at regular intervals. The input is the task scheduler settings, and the output is the periodic task execution. Specifically, the server sets up the following cron job:
[1153] (Example: 0 / usr / bin / python3 / path / to / scrape_script.py)
[1154] Step 2:
[1155] The server sends an HTTP request to the weather information provider's website according to the task scheduler. The server uses the requests library to access the website and get the HTML response. The input is the HTTP request, and the output is the HTML response. Specifically, the server sends the following request:
[1156] python
[1157] response = requests.get('https: / / example.com / earthquake')
[1158] Step 3:
[1159] The server analyzes the HTML response it receives. It uses BeautifulSoup to parse the response and extract the necessary epicenter information. The input is the HTML response, and the output is epicenter information (earthquake occurrence location, occurrence time, magnitude, and epicenter depth). Specifically, the information is extracted as follows:
[1160] python
[1161] soup = BeautifulSoup(response.content, 'html.parser')
[1162] location = soup.find('div', class_='location').text
[1163] event_time = soup.find('div', class_='time').text
[1164] magnitude = float(soup.find('div', class_='magnitude').text)
[1165] depth = float(soup.find('div', class_='depth').text)
[1166] Step 4:
[1167] The server stores the extracted epicenter information in a database. The server uses a database system such as MySQL to store the information permanently. The input is the epicenter information, and the output is the stored data. Specifically, the data is stored as follows:
[1168] python
[1169] db = mysql.connector.connect(
[1170] host="localhost",
[1171] user="user",
[1172] password="password",
[1173] database="earthquake_db"
[1174] )
[1175] cursor = db.cursor()
[1176] sql = "INSERT INTO earthquake_info (location, event_time, magnitude, depth) VALUES (%s, %s, %s, %s)"
[1177] values = (location, event_time, magnitude, depth)
[1178] cursor.execute(sql, values)
[1179] db.commit()
[1180] Step 5:
[1181] The user uses a device to send a request saying, "I want to know the latest earthquake information." The input is the user's request, and the output is the transmission of the request data. Specifically, the user presses the "Latest Earthquake Information" button on the smartphone app.
[1182] Step 6:
[1183] The terminal sends the user's request to the server. The terminal sends information to the server through an HTTP request. The input is the user's request, and the output is the request data sent to the server. Specifically, the request is sent as follows:
[1184] javascript
[1185] fetch('https: / / example.com / api / latest-earthquake')
[1186] .then(response => response.json())
[1187] .then(data => {
[1188] / / Handle data
[1189] });
[1190] Step 7:
[1191] The server analyzes the received request and retrieves the latest epicenter information from the database. The input is the user's request and the database, and the output is the latest epicenter information. Specifically, the server executes the query as follows:
[1192] python
[1193] sql = "SELECT FROM earthquake_info ORDER BY event_time DESC LIMIT 1"
[1194] cursor.execute(sql)
[1195] result = cursor.fetchone()
[1196] Step 8:
[1197] The server returns the acquired information in JSON format to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data. Specifically, the server converts the information and returns it as follows:
[1198] python
[1199] data = {
[1200] 'location': result[1],
[1201] 'event_time': result[2],
[1202] 'magnitude': result[3],
[1203] 'depth': result[4]
[1204] }
[1205] return jsonify(data)
[1206] Step 9:
[1207] The terminal parses the received JSON data and displays it to the user. The input is the epicenter information in JSON format, and the output is the information to be displayed to the user. Specifically, the terminal parses the data and displays it on the screen as follows:
[1208] javascript
[1209] fetch('https: / / example.com / api / latest-earthquake')
[1210] .then(response => response.json())
[1211] .then(data => {
[1212] document.getElementById('location').innerText = data.location;
[1213] document.getElementById('event_time').innerText = data.event_time;
[1214] document.getElementById('magnitude').innerText = data.magnitude;
[1215] document.getElementById('depth').innerText = data.depth;
[1216] });
[1217] (Application example 1)
[1218] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1219] In recent years, the importance of real-time earthquake monitoring and rapid information sharing has increased. There is a demand for systems that are easy to use and can be used immediately, without the need for dedicated devices or special facilities. However, many current systems have difficulty providing real-time information without delay in response to user requests, and there is no established method for providing evacuation guidance information quickly and appropriately in the event of a disaster. Improving this situation is a challenge.
[1220] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1221] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users and searching the database based on the requests to acquire corresponding epicenter information, means for transmitting and displaying the acquired epicenter information to a terminal to provide it to the user, scheduling means for automatically acquiring epicenter information at specified time intervals, and means for providing evacuation information in real time when a disaster occurs. This makes it possible to provide earthquake information and evacuation information to users quickly and accurately in real time.
[1222] A "weather information provider" is an organization or institution that collects, analyzes, and makes weather data available to the public.
[1223] "Epicenter information" refers to detailed data such as the location, time, magnitude, and depth of the earthquake's epicenter.
[1224] "Scraping" is a method of programmatically obtaining and analyzing data on the web.
[1225] A "database" is a system that systematically stores data and manages it so that it can be searched and retrieved efficiently.
[1226] "User" means an individual or organization that uses the system.
[1227] A "request" is a query or request for information made by a user to a system.
[1228] A "server" is a computer system that responds to requests from clients over a network and provides services.
[1229] A "terminal" is a computer or device that is directly operated by a user.
[1230] A "scheduling means" is a function or mechanism for automatically executing tasks at specific time intervals.
[1231] "Evacuation information" refers to information that guides people to safe locations and instructs them on appropriate actions when a disaster occurs.
[1232] This invention relates to a system in which a server scrapes earthquake information from the websites of weather information providers at regular intervals, stores the acquired information in a database, and provides information in real time in response to user requests.
[1233] Specifically, the server uses a task scheduler to periodically send HTTP requests to the weather information provider's website. The HTML response obtained through this request is analyzed to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The database is managed using a database system such as SQLite.
[1234] When a user wants to know the "most recent epicenter information" on a device such as a smartphone or PC, they open the application and send a request. The request from this device is sent to a server, which searches the database for the most recent epicenter information and returns it in JSON format to the device. The device reads this information and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[1235] Furthermore, when a large-scale earthquake occurs, the server crawls social media and news sites to collect local information and stores this information in the database. When a user sends a request to "know the local situation," the server also searches for and provides the latest information collected through the crawl. This allows users to quickly obtain not only the latest earthquake information, but also evacuation information and damage status.
[1236] The server uses Python to parse HTML using the BeautifulSoup library and saves the information in an SQLite database. It also uses Flask to build an API server to respond to user requests. It uses the Python schedule library for scheduling.
[1237] As a concrete example, if a magnitude 6.5 earthquake occurs in Tokyo, the server automatically retrieves this information from the website and stores it in an SQLite database. When a user sends a request for "latest earthquake information" via an application on their smartphone, the server immediately returns the latest information, allowing the user to check the earthquake information on their device. It can also provide users with evacuation information and information on the local situation.
[1238] An example prompt for a generative AI model is:
[1239] "Write a Python program to scrape earthquake information from the website of a weather information provider and notify users in real time. Store the information in an SQLite database and build an API server using Flask. Also, set up a scheduler to retrieve the information periodically."
[1240] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1241] Step 1:
[1242] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals.
[1243] Input: Task Scheduler trigger (time interval)
[1244] Data processing: Sending an HTTP request
[1245] Output: HTML response
[1246] Specific operation: The server uses Python's requests library to periodically send HTTP GET requests to the specified URL.
[1247] Step 2:
[1248] The server parses the HTML response it receives and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[1249] Input: HTML response
[1250] Data processing: HTML parsing using BeautifulSoup
[1251] Output: Earthquake information (location, time, magnitude, depth of earthquake)
[1252] What it does: The server uses the BeautifulSoup library to parse the HTML and extract earthquake information from specific tags and classes.
[1253] Step 3:
[1254] The server stores the acquired epicenter information in a database.
[1255] Input: Epicenter information
[1256] Data processing: Insertion into database
[1257] Output: The epicenter information is saved in the database.
[1258] Specific operation: The server uses the SQLite library to insert the extracted epicenter information into an SQLite database.
[1259] Step 4:
[1260] The user requests "information on the most recent earthquake epicenter" from their smartphone or computer.
[1261] Input: User request
[1262] Data processing: Analysis of request information
[1263] Output: Request content
[1264] Specific operation: The user opens a dedicated app or web page and enters a request to know the "most recent epicenter information."
[1265] Step 5:
[1266] The server receives the user request and retrieves the latest epicenter information from the database.
[1267] Input: User request
[1268] Data processing: Database search
[1269] Output: Latest earthquake information
[1270] Specific operation: The server analyzes the received request and retrieves the most recent earthquake epicenter information from the SQLite database.
[1271] Step 6:
[1272] The server returns the acquired epicenter information to the user's device in JSON format.
[1273] Input: Latest epicenter information
[1274] Data processing: Conversion to JSON format
[1275] Output: JSON format data
[1276] Specific operation: The server converts the acquired data into JSON format using Python's json library and returns it to the user's device as an HTTP response.
[1277] Step 7:
[1278] The terminal displays the epicenter information received from the server to the user.
[1279] Input: JSON format data
[1280] Data processing: Data analysis and presentation
[1281] Output: Display of epicenter information
[1282] Specific operation: The user's device parses the JSON data and displays the earthquake information on the screen. This means that the latest earthquake information is provided visually to the user on a smartphone app or web page.
[1283] Step 8:
[1284] The server provides real-time evacuation information in the event of a disaster.
[1285] Input: Additional information stored in the database (e.g., information from social media sites, news sites)
[1286] Data processing: Crawling to acquire information and storing it in a database
[1287] Output: Evacuation information
[1288] Specific operation: When a large-scale earthquake occurs, the server crawls social media and news sites, collects evacuation information, stores it in a database, and provides this information upon user request.
[1289] Through the above steps, the server, terminal, and user each fulfill their respective roles, enabling the rapid and accurate provision of epicenter information and evacuation information in real time.
[1290] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1291] This invention relates to a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests, combined with an emotion engine that recognizes user emotions.
[1292] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The server parses the HTML response obtained through this request and extracts information about the earthquake's location, time, magnitude, and epicenter depth. The obtained information is then stored in a database.
[1293] A user, for example, uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches and retrieves the latest epicenter information from its database. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[1294] The present invention further incorporates an emotion engine to adjust the presentation of epicenter information according to the user's emotional state. The emotion engine analyzes emotions from the user's input, voice, and facial expressions. If the user is feeling stressed or scared, the emotion engine changes the display format of the epicenter information based on the analysis results.
[1295] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is then sent to the device in JSON format, which the device reads and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[1296] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[1297] Furthermore, when a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information. This information is also stored in the database and provided in response to user requests. For example, if a user requests to know the local situation, the server searches for the information collected through the crawl and provides it to the user.
[1298] This allows users to quickly obtain not only the latest earthquake information, but also information on the extent of damage and evacuation information, enabling them to take appropriate action and providing information that suits the user's emotional state.In this way, the present invention is a system that quickly and accurately provides the epicenter and local information that users need, while at the same time providing flexible information that takes into account the user's emotional state.
[1299] The processing flow will be explained below.
[1300] Step 1:
[1301] The server sets up a task scheduler to send an HTTP request to the weather information provider's website at regular intervals (for example, every minute).
[1302] Step 2:
[1303] The server parses the received HTML response and extracts information about the earthquake's epicenter, such as its location, time of occurrence, magnitude, and epicenter depth.
[1304] Step 3:
[1305] The server checks whether the extracted information overlaps with existing data, and if it is new information, it stores it in the database.
[1306] Step 4:
[1307] The user uses the terminal to input and send a request for earthquake source information (e.g., information on the most recent earthquake source).
[1308] Step 5:
[1309] The device sends the user's request to the server as an HTTP request to the API endpoint.
[1310] Step 6:
[1311] The server analyzes the received user request and generates a query according to the requirements (e.g., get the latest earthquake information).
[1312] Step 7:
[1313] The server queries the database to obtain the required epicenter information.
[1314] Step 8:
[1315] The server formats the acquired epicenter information into JSON format and sends it to the terminal as a response.
[1316] Step 9:
[1317] The emotion engine analyzes the user's facial expressions, voice, and inputs to assess their emotional state, using the device's built-in camera and microphone.
[1318] Step 10:
[1319] The device receives the analysis results of the emotion engine and determines the display format according to the user's emotional state. For example, if the user is feeling stressed, the device will reduce the amount of information displayed and provide earthquake information in a simplified format.
[1320] Step 11:
[1321] The device displays the epicenter information generated based on the analysis results to the user, and if necessary, additional safety information and evacuation advice may also be displayed.
[1322] Step 12:
[1323] When a large-scale earthquake occurs, the server automatically crawls social networking services and news sites to collect real-time local information.
[1324] Step 13:
[1325] The server stores the collected real-time information in a database and keeps it available in response to user requests.
[1326] Step 14:
[1327] When a user sends a request to know the local situation, the server retrieves the latest real-time information from the database and provides it to the user.
[1328] Example 2
[1329] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1330] In conventional earthquake information provision systems, it is important to provide users with appropriate information quickly. However, because they do not take into account the user's emotional state, there is a problem in that the information provided is insufficient for users who feel fear or anxiety, and they are unable to convey appropriate countermeasures. Furthermore, there is also the issue of quickly collecting local information and providing it to users when a large-scale earthquake occurs.
[1331] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[1332] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving requests from users, searching the database based on the requests, and acquiring corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, and means for adjusting the display of information according to the user's emotional state using an emotion engine that analyzes the user's emotions. This makes it possible to provide epicenter information while taking the user's emotional state into consideration, and to quickly convey appropriate countermeasures and reassurance information to users who are feeling anxious or scared. Furthermore, when a large-scale earthquake occurs, local information can be quickly collected and provided to users.
[1333] "Weather data providers" are organizations or institutions that collect and analyze weather and disaster data and provide it to the public.
[1334] "Scraping" is a technique for automatically obtaining specific data from a website.
[1335] "Epicenter information" is a general term for specific data about earthquakes, such as the location and time of occurrence, magnitude, and depth of the epicenter.
[1336] A "database" is a system for efficiently storing, retrieving, and managing data.
[1337] A "request" is an action or content of a user requesting some information or service from the system.
[1338] An "emotion engine" is software or algorithms that analyze a user's emotional state based on their input, voice, facial expressions, etc.
[1339] A "task scheduler" is a system for automatically executing specific tasks or programs at regular intervals.
[1340] "Analysis" is the process of examining data or information in detail to understand its content and meaning.
[1341] "Adjustment" is the act of appropriately modifying information or behavior to suit specific conditions or requirements.
[1342] "JSON format" stands for JavaScript Object Notation and is a format for storing and exchanging data in text format.
[1343] This invention combines a system that scrapes earthquake information from the websites of weather information providers, stores the acquired information in a database, and provides information in real time in response to user requests with an emotion engine that recognizes user emotions.
[1344] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). Specifically, the server uses Python's requests module to send the HTTP requests and parses the HTML response it receives using BeautifulSoup. From the parsed data, it extracts information about the earthquake's location, time of occurrence, magnitude, and epicenter depth. The extracted data is then saved in a database management system such as MySQL or PostgreSQL. An ORM library such as sqlalchemy is used to insert the data into the database.
[1345] A user uses a smartphone or computer to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends an HTTP request to the server, which then analyzes the request. Based on the analysis results, the server searches and retrieves the most recent epicenter information from a database and returns it in JSON format to the device. The device then displays the received JSON data to the user. HTML and CSS are often used for display.
[1346] The system also incorporates an emotion engine that analyzes emotions from user input, voice, and facial expressions. The emotion engine uses software such as TensorFlow and OpenCV. The device sends data obtained using the user's camera and microphone to the emotion engine, which then analyzes the user's emotional state in real time. Based on the analysis results, the server adjusts the display format of information according to the user's emotional state. For example, if the user is feeling fear or stress, the server simplifies the display of information about the epicenter and adds reassurance information and evacuation advice.
[1347] As a concrete example, consider the case where a user uses a smartphone to request "information on the most recent earthquakes." The user opens the app and presses the "information on the most recent earthquakes" button, causing the device to send a request to the server. The server retrieves the latest earthquake information from the database and sends it in JSON format to the device. The device analyzes the retrieved data and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[1348] The emotion engine analyzes the user's facial expressions using a camera, and if it detects that the user is feeling fear or stress, the device adjusts the display of information about the earthquake's source, such as providing immediate information about the extent of the earthquake's impact, evacuation sites, and first aid procedures, to ease the user's anxiety.
[1349] A specific example of a prompt sentence is, "Please tell me the steps to take if I want to know the latest earthquake information using a smartphone app." This system responds quickly and accurately to such specific requests, providing information that takes into account the user's emotional state.
[1350] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1351] Step 1:
[1352] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals (for example, every 10 minutes). It uses the requests module to send the requests and receive HTML responses. The input is the HTTP request, and the output is the HTML response.
[1353] Step 2:
[1354] The server parses the received HTML response using BeautifulSoup. Specifically, it extracts the earthquake's location, time, magnitude, and epicenter depth from specific HTML tags and classes. The input is the HTML response, and the output is the extracted epicenter information (e.g., "Location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", "Depth: 10km").
[1355] Step 3:
[1356] The server converts the extracted epicenter information into dictionary format and stores it in a MySQL or PostgreSQL database using sqlalchemy. The input is the dictionary format of the epicenter information, and the output is the epicenter information stored in the database.
[1357] Step 4:
[1358] A user uses an application on a smartphone or computer to send a request from the device saying, "I want to know the most recent epicenter information." The input is the user's request, "I want to know the most recent epicenter information," and the output is sent to the server as an HTTP request.
[1359] Step 5:
[1360] The terminal sends a request from the user to the server as an HTTP request. The input is the request from the user, and the output is the HTTP request sent to the server.
[1361] Step 6:
[1362] The server analyzes the received HTTP request and searches the database for the latest earthquake source information. For example, it uses an SQL SELECT statement to execute a query such as "SELECT FROM earthquake_info ORDER BY time DESC LIMIT 1." The input is the HTTP request and the database contents, and the output is the latest earthquake source information.
[1363] Step 7:
[1364] The server converts the acquired epicenter information into JSON format and sends it to the terminal. The input is the epicenter information acquired from the database, and the output is JSON format data.
[1365] Step 8:
[1366] The terminal analyzes the received JSON data and displays information to the user, such as the epicenter, time of occurrence, magnitude, depth of the epicenter, etc. The input is the epicenter information in JSON format, and the output is the information to be displayed.
[1367] Step 9:
[1368] The device sends data obtained using the user's camera and microphone to the emotion engine, which then uses TensorFlow and OpenCV to analyze the user's emotional state in real time. The input is data obtained from the camera and microphone, and the output is the result of analyzing the user's emotions.
[1369] Step 10:
[1370] If the emotion engine analyzes the user's emotion as "fear" or "anxiety," the server simplifies the display of the epicenter information and adds reassurance information and evacuation advice. The input is the emotion analysis result, and the output is the adjusted epicenter information.
[1371] Step 11:
[1372] The server converts the adjusted epicenter information back into JSON format and sends it back to the terminal. The input is the adjusted epicenter information, and the output is JSON format data.
[1373] Step 12:
[1374] The device again analyzes the received JSON data and displays the adjusted information to the user. For example, it might display information such as "Earthquake location: XX", "Time: YYYY-MM-DD HH:MM", "Magnitude: 6.5", and "Please evacuate immediately". The input is the adjusted JSON data, and the output is the adjusted information displayed to the user.
[1375] (Application example 2)
[1376] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1377] Conventional earthquake information systems simply provide users with information about the epicenter, and lack consideration for the fear and stress felt by users. Furthermore, there is a need for systems that not only provide the latest epicenter information in real time, but also properly communicate local conditions and evacuation information in the event of a large-scale earthquake. To address these issues, it is necessary to provide a system that reduces the mental burden on users and allows them to receive information quickly and with peace of mind.
[1378] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1379] In this invention, the server includes means for scraping and acquiring epicenter information from the websites of weather information providers, means for storing the acquired epicenter information in a database, means for receiving a request from a user, searching the database based on the request, and acquiring the corresponding epicenter information, means for transmitting the acquired epicenter information to a terminal and displaying it to provide it to the user, means for analyzing the user's emotional state, and means for adjusting the display of the epicenter information based on the analysis results. This enables flexible information provision according to the user's emotional state and rapid provision of local information when a large-scale earthquake occurs.
[1380] A "weather information provider" is an organization that collects and provides information related to weather and natural disasters such as earthquakes.
[1381] "Epicenter information" refers to information about the location, time, magnitude, and depth of the earthquake's epicenter.
[1382] "Scraping" is a technique for automatically obtaining specific information from a web page.
[1383] A "database" is a system for systematically storing and managing information.
[1384] A "request" is an act by a user requesting specific information from the system.
[1385] "Emotional state" refers to the user's psychological state, including emotions such as fear and stress.
[1386] "Analysis" is the act of examining data or information in detail to clarify its meaning.
[1387] "Adjusting the display" refers to changing the way information is displayed depending on the user's situation.
[1388] The present invention relates to a system for scraping earthquake information from the websites of weather information providers and storing the acquired information in a database. Specific embodiments will be described below.
[1389] First, the server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The HTML response obtained through this request is parsed to extract earthquake epicenter information such as the earthquake's location, time of occurrence, magnitude, and epicenter depth. The obtained information is then stored in a database. The main software used is Python for scraping and database operations, and SQLite is used as the database.
[1390] For example, a user can use a smartphone to send a request from their device saying, "I want to know the most recent epicenter information." The device then sends this request to the server, which then searches the database for the most recent epicenter information. The retrieved information is returned in JSON format to the device, which then displays it to the user.
[1391] A distinctive feature of this invention is the incorporation of an emotion engine. The emotion engine analyzes emotions from user input (voice, facial expressions). For example, Microsoft Azure's Emotion API can be used. If the emotion engine determines that the user is feeling fear or stress, it adjusts the format of the epicenter information displayed on the device screen. Specifically, it can simplify the epicenter information and display additional reassurance information and evacuation advice. This can ease the user's anxiety and encourage appropriate behavior.
[1392] For example, if a user wants to get "information on the latest earthquakes" using a smartphone, they open the app and press the "Latest Earthquake Information" button, and the device sends a request to the server. The server analyzes the request and retrieves the latest earthquake information from the database. The information is sent to the device in JSON format, and the device reads it and displays information such as the epicenter, time of occurrence, magnitude, and depth of the epicenter to the user.
[1393] Additionally, if the emotion engine analyzes the user's facial expressions using a camera and detects that the user is feeling fear or stress, the device will simplify the display of information about the epicenter or add reassurance information and evacuation advice. For example, by immediately providing information such as the extent of the earthquake's impact, evacuation locations, and first aid methods, the device can ease the user's anxiety and encourage appropriate action.
[1394] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[1395] Get recent earthquake data.
[1396] Analyze user sentiment.
[1397] If they are feeling scared or stressed, provide reassurance information.
[1398] In this way, the present invention is a system that quickly and accurately provides the epicenter information and local information required by the user, while at the same time realizing flexible information provision that takes into account the emotional state of the user.
[1399] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1400] Step 1:
[1401] The server uses a task scheduler to send HTTP requests to the weather information provider's website at regular intervals. The input is a notification from the task scheduler, and the output is the HTML response it receives. After receiving the HTML response, the server parses it using a library such as BeautifulSoup to extract information about the earthquake's location, time of occurrence, magnitude, and epicenter depth.
[1402] Step 2:
[1403] The server stores the extracted epicenter information in a database. The input is the epicenter information obtained in step 1, and the output is the epicenter information stored in the database. The server stores the information using a database management system such as SQLite.
[1404] Step 3:
[1405] A user uses a smartphone to send a request from the device saying, "I want to know the latest epicenter information." The input is the user's request, and the output is the request sent to the server. The device sends an HTTP request to the server.
[1406] Step 4:
[1407] The server analyzes the received user request and retrieves the latest earthquake information from the database. The input is the user request and the database, and the output is the retrieved latest earthquake information in JSON format.
[1408] Step 5:
[1409] The server sends the acquired epicenter information to the terminal. The input is the epicenter information acquired in step 4, and the output is sent to the terminal. The server returns JSON data to the terminal as an HTTP response.
[1410] Step 6:
[1411] The terminal displays the epicenter information received from the server to the user. The input is JSON data from the server, and the output is the display of the epicenter information on the screen. The terminal analyzes the received data and displays it on the screen.
[1412] Step 7:
[1413] The device detects the user's emotional state using a camera or microphone and sends it to the emotion engine. The input is the user's facial expression and voice data, and the output is sent to the emotion engine. The device acquires data from the camera or microphone and requests the emotion engine to analyze it.
[1414] Step 8:
[1415] The emotion engine analyzes the user's emotional state. The input is facial expression and voice data from the device, and the output is the analysis results. The emotion engine performs its analysis using, for example, Microsoft Azure's Emotion API.
[1416] Step 9:
[1417] The device receives the analysis results from the emotion engine and adjusts the display format. The input is the analysis results of the emotion engine, and the output is the adjusted display. If the user is feeling fear or stress, the device will simplify the display of earthquake source information and add reassurance information and evacuation advice.
[1418] As a concrete example, the prompt sentence to be input to the generative AI model is as follows:
[1419] Get recent earthquake data.
[1420] Analyze user sentiment.
[1421] If they are feeling scared or stressed, provide reassurance information.
[1422] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[1423] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1424] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.
[1425] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.
[1426] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.
[1427] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.
[1428] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).
[1429] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.
[1430] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."
[1431] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.
[1432] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).
[1433] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input data.
[1434] In the above embodiment, an example in which the specific processing program 56 is stored in the storage 32 has been described, but the technology of the present disclosure is not limited to this. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes the specific processing in accordance with the specific processing program 56.
[1435] Alternatively, the specific processing program 56 may be stored in a storage device such as a server connected to the data processing device 12 via the network 54, and the specific processing program 56 may be downloaded and installed on the computer 22 in response to a request from the data processing device 12.
[1436] It is not necessary to store all of the specific processing program 56 in a storage device such as a server connected to the data processing device 12 via the network 54, or to store all of the specific processing program 56 in the storage 32; only a portion of the specific processing program 56 may be stored.
[1437] The hardware resource for executing a specific process can be any of the following processors: An example of a processor is a CPU, which is a general-purpose processor that functions as a hardware resource for executing a specific process by executing software, i.e., a program. Another example of a processor is a dedicated electrical circuit, such as an FPGA (Field-Programmable Gate Array), a PLD (Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit), which is a processor with a circuit configuration designed specifically for executing a specific process. Each processor has built-in or connected memory, and each processor uses the memory to execute the specific process.
[1438] The hardware resource that executes the specific processing may be configured with one of these various processors, or may be configured with a combination of two or more processors of the same or different types (for example, a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Also, the hardware resource that executes the specific processing may be a single processor.
[1439] As an example of a system configured with a single processor, first, one processor is configured by combining one or more CPUs and software, and this processor functions as a hardware resource that executes a specific process. Second, there is a system that uses a processor that realizes the functions of an entire system including multiple hardware resources that execute a specific process on a single IC chip, as typified by SoC (System-on-a-chip). In this way, a specific process is realized using one or more of the above-mentioned various processors as hardware resources.
[1440] Furthermore, the hardware structure of these various processors can be, more specifically, an electric circuit that combines circuit elements such as semiconductor devices. The specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps may be deleted, new steps may be added, or the processing order may be rearranged, without departing from the spirit of the invention.
[1441] The above-described description and illustrations are a detailed explanation of the parts related to the technology of the present disclosure and are merely an example of the technology of the present disclosure. For example, the above description of the configuration, functions, actions, and effects is an explanation of an example of the configuration, functions, actions, and effects of the parts related to the technology of the present disclosure. Therefore, it goes without saying that unnecessary parts may be deleted, new elements may be added, or replacements may be made to the above-described description and illustrations within the scope of the gist of the technology of the present disclosure. Furthermore, to avoid confusion and facilitate understanding of the parts related to the technology of the present disclosure, the above-described description and illustrations omit explanations of common technical knowledge that do not require particular explanation to enable the implementation of the technology of the present disclosure.
[1442] All publications, patent applications, and technical standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or technical standard was specifically and individually indicated to be incorporated by reference.
[1443] The following is further disclosed regarding the above embodiment.
[1444] (Claim 1)
[1445] A method for scraping and obtaining earthquake information from the websites of weather information providers;
[1446] A means for storing the acquired epicenter information in a database;
[1447] a means for receiving a request from a user, searching a database based on the request, and obtaining corresponding epicenter information;
[1448] A means for transmitting and displaying the acquired epicenter information to a terminal for providing it to the user.
[1449] A system including:
[1450] (Claim 2)
[1451] 2. The system according to claim 1, wherein when the user's request is for the most recent epicenter information, the system acquires the most recent epicenter information from the database.
[1452] (Claim 3)
[1453] 2. The system according to claim 1, wherein when the user's request is for epicenter information of a fixed point, epicenter information relating to a specific point is obtained from a database.
[1454] (Claim 4)
[1455] 10. The system according to claim 1, further comprising means for crawling social networking services and news sites to automatically collect real-time local information after a large-scale earthquake occurs.
[1456] (Claim 5)
[1457] 5. The system according to claim 4, wherein the real-time local information is stored in a database and provided in response to a user's request.
[1458] "Example 1"
[1459] (Claim 1)
[1460] A method for scraping and obtaining earthquake information from the websites of weather information providers;
[1461] A means for storing the acquired epicenter information in a database;
[1462] a means for receiving a request from a user, searching a database based on the request, and obtaining corresponding epicenter information;
[1463] A means to send the acquired epicenter information in JSON format to the user's terminal and display it;
[1464] means including a task scheduler for periodically sending HTTP requests to the weather information provider's website;
[1465] HTML parsing means for analyzing the epicenter information;
[1466] A system including:
[1467] (Claim 2)
[1468] 2. The system according to claim 1, wherein when the request from the user is for the most recent epicenter information, the system obtains the most recent epicenter information from the database and returns it to the user's terminal in JSON format.
[1469] (Claim 3)
[1470] The system according to claim 1, wherein when the request from the user is for epicenter information of a fixed point, the system obtains epicenter information for the specific point from a database and returns it to the user's terminal in JSON format.
[1471] "Application Example 1"
[1472] (Claim 1)
[1473] A method for scraping and obtaining earthquake information from the websites of weather information providers;
[1474] A means for storing the acquired epicenter information in a database;
[1475] a means for receiving a request from a user, searching a database based on the request, and obtaining corresponding epicenter information;
[1476] means for transmitting the acquired epicenter information to a terminal and displaying it for provision to a user;
[1477] a scheduling means for automatically acquiring epicenter information at designated time intervals;
[1478] A means of providing real-time evacuation information in the event of a disaster,
[1479] A system including:
[1480] (Claim 2)
[1481] 2. The system according to claim 1, wherein when the user's request is for the most recent epicenter information, the system acquires the most recent epicenter information from the database.
[1482] (Claim 3)
[1483] 2. The system according to claim 1, wherein when the user's request is for epicenter information of a fixed point, epicenter information relating to a specific point is obtained from a database.
[1484] "Example 2: Combining Emotion Engines"
[1485] (Claim 1)
[1486] A method for scraping and obtaining earthquake information from the websites of weather information providers;
[1487] A means for storing the acquired epicenter information in a database;
[1488] a means for receiving a request from a user, searching a database based on the request, and obtaining corresponding epicenter information;
[1489] means for transmitting the acquired epicenter information to a terminal and displaying it for provision to a user;
[1490] a means for adjusting the display of information according to the emotional state of the user using an emotion engine that analyzes the emotion of the user;
[1491] A system including:
[1492] (Claim 2)
[1493] 2. The system according to claim 1, wherein when the user's request is for the most recent epicenter information, the system acquires the most recent epicenter information from the database.
[1494] (Claim 3)
[1495] 2. The system according to claim 1, wherein when the user's request is for epicenter information of a fixed point, epicenter information relating to a specific point is obtained from a database.
[1496] "Application example 2 when combining emotion engines"
[1497] (Claim 1)
[1498] A method for scraping and obtaining earthquake information from the websites of weather information providers;
[1499] A means for storing the acquired epicenter information in a database;
[1500] a means for receiving a request from a user, searching a database based on the request, and obtaining corresponding epicenter information;
[1501] means for transmitting the acquired epicenter information to a terminal and displaying it for provision to a user;
[1502] means for analyzing the emotional state of a user;
[1503] a means for adjusting the display of the epicenter information based on the analysis results;
[1504] A system including:
[1505] (Claim 2)
[1506] 2. The system according to claim 1, wherein when the user's request is for the most recent epicenter information, the system acquires the most recent epicenter information from the database.
[1507] (Claim 3)
[1508] 2. The system according to claim 1, wherein when the user's request is for epicenter information of a fixed point, epicenter information relating to a specific point is obtained from a database. [Explanation of symbols]
[1509] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>
Claims
1. A method for scraping and obtaining earthquake information from the websites of weather information providers; A means for storing the acquired epicenter information in a database; a means for receiving a request from a user, searching a database based on the request, and obtaining corresponding epicenter information; A means for transmitting and displaying the acquired epicenter information to a terminal for providing it to the user. A system including:
2. 2. The system according to claim 1, wherein when the user requests the most recent epicenter information, the most recent epicenter information is obtained from the database.
3. 2. The system according to claim 1, wherein when the user's request is for information on the epicenter of a fixed point, information on the epicenter of a specific point is obtained from a database.
4. The system according to claim 1, further comprising means for crawling social networking services and news sites to automatically collect real-time local information after a large-scale earthquake occurs.
5. 5. The system according to claim 4, wherein the real-time local information is stored in a database and provided in response to a request from a user.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A