상세 컨텐츠

본문 제목

01. 연구 (2) 원전 정책 담론 연구 05 연구 인프라 및 구현 구조

본문

이 글은 이전 문서(00. 개요)의 후속 내용으로,

해당 연구 설계 및 구현 구조를 보다 구체적으로 정리했다.

 

블로그에 공개한 01–06 문서는 당시 컨택 과정에서 제출했던 18페이지 분량의 영어 연구계획서 가운데

방법론과 연구 구현에 해당한다. 

최종 제출본에는 분량 제한 때문에 일부만 반영되었지만,

방법론 부분이 가장 오래 수정 및 검토되었다.

 

연구계획서를 작성하는 일련의 과정 속에서,

나는 연구 과정을 스스로 설명할 수 있어야 한다는 점을 중요하게 여겼다.

 

예상과 다른 결과가 나오면 원인을 다시 확인했고, 구현 과정이 바뀌면 방법론도 함께 수정했다.

연구 질문과 분석 구조가 맞지 않는다고 판단한 부분은 여러 번 다시 설계했다.

 

래서 블로그에 공개한 문서에는 완성된 결과보다 시행착오와 수정 과정, 

그리고 연구를 진행하면서 마주했던 한계와 고민이 더 많이 남아 있다.

 

본론


05. Research Infrastructure


처음부터 연구 시스템을 만들 계획은 없었다. 

그런데 Python으로 분석하고 SQL로 데이터를 관리하는 작업을 반복하다 보니, 

연구 전체를 하나의 구조로 정리할 필요가 생겼다. 

 

이 문서는 개발 자체를 설명하기보다 

연구 방법론이 실제 코드와 데이터 구조에서 어떻게 구현되는지를 기록하기 위해 작성했었다.

(정확히는 Git Read Me로 쓰려고 만들었는데,

첫 글에도 나오듯 Git Read Me에는 다른 내용을 담게 되었다.)

 

 

 


1. Purpose of the Infrastructure Design (System-Oriented Research Infrastructure)

This study designs and implements a research data infrastructure to analyze the structural relationship between policy events and changes in discourse based on news text data.

This infrastructure is not a simple data processing system, but a system-oriented research infrastructure that extends the analytical framework defined in Chapter 5 of the methodology into an executable system.

In particular, this system integrates the following functions:

  • Data collection and storage
  • Multi-stage data preprocessing (Data Reduction & Cleaning)
  • Concept alignment based on Core Keywords
  • Policy event–based data linking
  • TF-IDF–based discourse analysis
  • Web-based visualization and result delivery

In other words, this infrastructure is an execution-level analytical system that implements the research methodology at the code level.


2. Overall System Architecture

The data infrastructure of this study consists of the following three layers.


2.1 Data Construction Layer

The Data Construction Layer includes preprocessing steps from data collection to corpus construction and directly corresponds to the dataset construction stage in the research methodology.

  • News data collection via BigKinds
  • Data Reduction (Python-based rule processing)
  • Data Cleaning (structural refinement and quality control)
  • Core Keyword construction (automation + manual validation)
  • Corpus construction and database loading

Here, Core Keywords serve as an intermediate conceptual layer that ensures semantic alignment between data-driven keywords and policy concepts.


2.2 Analysis Layer

The Analysis Layer performs discourse analysis based on the preprocessed corpus.

  • Sub-dataset generation through Analysis Filtering
  • TF-IDF–based discourse importance analysis (Python)
  • Interpretation of discourse changes before and after policy events

2.3 Visualization Layer

The Visualization Layer presents analysis results in an interpretable form.

  • Data delivery via Spring Boot
  • SQL abstraction using MyBatis Mapper
  • Visualization using Chart.js

3. Data Processing Pipeline

The data processing pipeline follows the structure below:

Literature review and theoretical background

→ Search query design (Phase 1 & 2)

→ News data collection via BigKinds

→ Data Reduction

→ Data Cleaning

→ Core Keyword construction

→ Corpus construction

→ Analysis Filtering

→ TF-IDF analysis

→ Interpretation of discourse changes and visualization

This structure maintains a hierarchical flow from data collection → reduction → cleaning → conceptualization → analysis, with each stage functioning as an independent processing unit.


4. Database Design and Structural Features


4.1 Relational Discourse Analysis Structure

The database is designed based on the following relational structure:

News Article → Keyword → Policy Event → (International Framework)

This enables multi-layered relational discourse analysis between articles, keywords, and policy events.


4.2 Time-Series Expansion Support Structure

From the initial design stage, the database was structured to flexibly support expansion and modification of time-series analysis periods.

  • Analysis time points are separately managed via published_date and event_date
  • Time intervals are dynamically generated at the SQL query level
  • Structural modification is not required when changing time periods

Although the dataset is built on 1994–2025 news data, the structure allows extension to periods prior to the 1990s through simple data addition.

This indicates that the infrastructure is not dependent on a fixed time range, but represents a:

Temporal Scalable Discourse Analysis Structure


4.3 Core Table Structure

  • news_article
  • keyword_dictionary
  • article_keyword_map
  • nuclear_event
  • news_event_map
  • international_framework
  • international_organization

In particular, article_keyword_map is a key analytical table containing:

  • frequency: keyword occurrence count
  • tfidf_score: discourse importance calculated in Python

4.4 ERD-Based Integrated Structure

  • Article–Keyword: many-to-many (article_keyword_map)
  • Article–Event: many-to-many (news_event_map)
  • Event–International Framework: many-to-many (event_framework_map)

Additionally, nuclear plant information and radiation data are included as auxiliary structures for extended analysis.


4.5 Indexing and Performance Optimization

To ensure efficient processing of large-scale news data and JOIN operations, the following indexing strategy is applied:

  • news_article(published_date) → time-series query optimization
  • article_keyword_map(article_id, keyword_id) → mapping optimization
  • news_event_map(article_id, event_id) → event-based analysis optimization

In particular, the system is designed with composite index–centered optimization considering GROUP BY + JOIN-based analytical queries.


5. SQL and Data Access Layer


5.1 Role of SQL

In this study, SQL is not used as an analytical tool, but as a:

  • Data storage layer
  • Relational structure management layer
  • Aggregation result provider

All TF-IDF computation and discourse analysis are performed in Python, while SQL is used only for aggregation and retrieval.


5.2 Mapper-Based Data Access Structure

The system uses MyBatis Mapper to construct the Data Access Layer.

The Mapper performs:

  • Encapsulation of complex JOIN queries
  • SQL reuse improvement
  • Separation of web and data layers

5.3 NewsMapper Implementation Structure

The system retrieves analytical data through the following Mapper queries:

(1) Time-Series Discourse Analysis

  • Aggregation by year × keyword × policy stage
  • LEFT JOIN to prevent missing data
  • NULL handling for stable analysis

(2) Keyword Frequency Analysis

  • Extraction of top keywords from entire corpus
  • Identification of discourse structure by category

(3) TF-IDF Importance Analysis

  • Keyword importance based on average TF-IDF
  • Composite index combining frequency and importance

This Mapper structure functions not merely as a query layer but as a core interface for delivering analytical results to the visualization layer.


5.4 TiDB Physical Design Features

The system is designed under a distributed architecture assumption to process hundreds of thousands to millions of news records.

Focus is placed on optimizing JOIN- and GROUP BY–heavy discourse analysis queries.


6. Analysis Layer Implementation


6.1 Analysis Filtering

This step generates a sub-dataset tailored to the research purpose:

  • Policy keyword filtering
  • Discourse keyword filtering

6.2 TF-IDF Analysis and Data Reliability

  • Python-based implementation using scikit-learn for vectorization and keyword importance computation
  • Integration of TF-IDF results into RDBMS (article_keyword_map)
  • Validation mechanism comparing Python results with SQL frequency aggregation

6.3 Discourse Interpretation

  • Pre/post policy event comparison
  • Policy stage–based analysis (period_stage)
  • Time-series–based discourse interpretation

6.4 Morphological Analysis and Text Processing (Not Used / Design Stage)

The system adopts a modular preprocessing structure that allows flexible selection of analysis tools:

  • Pluggable tokenization engine (e.g., MeCab, Khaiii)
  • Noun-centered keyword extraction for policy discourse precision
  • User dictionary expansion using Core Keywords
  • Standardized normalization pipeline (stopwords, cleaning, synonym integration)

6.5 Core Keyword Construction and Validation

Core Keywords ensure alignment between data-driven extraction and policy concepts.

  • Automated extraction based on TF/weight
  • Manual validation by researcher

Validation criteria:

  1. Semantic relevance
  2. Concept refinement
  3. Literature consistency
  4. Statistical significance

Core Keywords serve as the foundation for all subsequent analysis stages.


6.6 Data Update and Scalability

The system supports incremental data processing:

  • Preserves existing data while processing new inputs
  • Batch + incremental hybrid pipeline
  • DB-driven updates reflected in visualization layer
  • Enables long-term scalable analysis environment

7. System Service and Visualization Structure


7.1 System Flow

DB → Spring Boot → Mapper → View → Chart.js

7.2 Roles

  • Spring Boot: service layer
  • MyBatis: data access layer
  • Chart.js: visualization layer

7.3 Functions

  • Time-series discourse change
  • Event-based comparison
  • Keyword evolution tracking

8. Deployment and Operation System


8.1 Architecture

Python TF-IDF Engine
↓
TiDB Cloud Database
↓
Spring Boot Web System
↓
Chart.js Visualization

8.2 Operating Environment

  • RENDER cloud deployment
  • GitHub-based CI/CD
  • Spring Boot auto-deployment
  • Python analysis module integration

9. Key Features of the Infrastructure Design

  • 1:1 mapping with research methodology
  • Clear separation of data reduction, cleaning, conceptualization, and analysis
  • Clear division between Python (analysis) and SQL (storage)
  • Time-series scalable architecture
  • Fully executable system using Mapper-based structure

10. Research Scalability


10.1 Policy Event Expansion

  • Cross-national comparative studies
  • Policy-type classification extension
  • Pre-1990 time-series expansion

10.2 International Framework Analysis

  • Mapping between OECD/IAEA and domestic policies
  • Quantitative analysis of policy diffusion
  • Global governance positioning analysis

10.3 Digital History Applications

  • Long-term discourse evolution analysis
  • News as historical data source
  • Policy–society interaction analysis
  • Platform-based collaborative research environment

10.4 Social Discourse Structure Analysis

  • security, safety, diplomacy, economy, conflict categories
  • TF-IDF–based discourse landscape mapping
  • Time-series discourse tracking
  • Network-based issue relationship analysis

11. Conclusion

This research infrastructure is not a simple data processing system but a structured execution framework implementing the research methodology with data reduction and conceptual alignment at its core.

In particular, it integrates:

  • Time-series scalability
  • Core Keyword conceptual alignment
  • Python–SQL–Web layered separation
  • Mapper-based system implementation
  • Policy event and international framework expansion

Through this, the study proposes a fully reproducible and scalable integrated analytical environment for analyzing the relationships among policy events, news discourse, and conceptual structures.

This document describes the structural foundation supporting the analytical framework presented in the Research Methodology.

Detailed technical specifications are provided in Appendix A. Research Infrastructure.

For practical system execution and interface-level implementation, see the System Implementation and Demonstration.

관련글 더보기