League of Legends Universe Knowledge Graph

EpiK Protocol
4 min read4 days ago

--

1. Project Introduction

“League of Legends” (LOL) is a multiplayer online battle arena (MOBA) game developed by Riot Games in the United States and operated by Tencent Games in mainland China. Over the years, the League of Legends IP has spawned many peripheral industries, with the League of Legends Universe being one of them. This universe gathers the legendary stories of champions on a magical continent called Runeterra, encompassing everything from the overarching worldview to local customs and traditions. We utilized Python to scrape the background stories of the champions, processed the collected data through cleaning and extraction, and then imported the resulting triples into Neo4j, establishing a simple query service.

2. Data Acquisition and Preprocessing

2.1 Obtaining Raw Data via Web Scraping

After research, we chose the official platform of the League of Legends Universe (https://yz.lol.qq.com/zh_CN/) as our primary data source. We sent HTTP requests to obtain the website’s JSON data, then parsed the data to retrieve the raw information. The method to obtain JSON is shown in the code below, where we primarily extract data about champions and their respective regions:

2.2 Data Processing Results

In the raw data, structured information such as champions’ titles and roles can be directly used to construct triples for the knowledge graph, while their interrelationships need to be extracted from the background story texts to create an initial relationship graph, which is then manually corrected and completed. We identified over a dozen types of relationships, including friends, rivals, mentors, and allies, specific to the League of Legends Universe.

In addition to triples focused on champions, we also established triples based on various countries and regions within the League of Legends Universe, analyzing the customs of each city-state to bring the knowledge graph closer to the official descriptions. We stored the obtained triples in CSV files for easy access by Neo4j.

After data processing, we obtained four sets of structured data: champion entities and their attributes, champion relationships, city-state data, and the customs data of each city-state.

Figure 1: Champion Entities and Attributes

Figure 2: Champion Relationship Triples

Figure 3: City-State Data

Figure 4: Customs Data of Each City-State

3. Knowledge Graph Visualization

On the League of Legends Universe platform, game designers create stories around specific events, thereby constructing a complete virtual world. Next, we imported the structured data into Neo4j to recreate the character relationships in significant events within the League of Legends Universe.

3.1 Simple Knowledge Graph of “Arcane”

“League of Legends: Arcane” is a recently popular official animated series. We use the knowledge graph to simply display the relationships between the main characters in Arcane. Although limited by the extraction technology and the completeness of the official platform’s data, the graph effectively represents the relationships among the characters.

3.2 Simple Knowledge Graph of “Sentinels of Light vs. Viego”

The story of the Sentinels of Light confronting the Ruined King Viego is another significant event in the League of Legends Universe. We use the knowledge graph to restore the character relationships in this series of stories.

3.3 Customs of Each City-State

Through our constructed knowledge graph, we can also gain insights into the customs and traditions of the various city-states within the League of Legends Universe.

4. Summary and Outlook

In this project, we learned the process of acquiring raw data, preprocessing, extraction, and constructing a knowledge graph. Due to the limitations of the extraction technology and the completeness of the official platform’s data, the knowledge graph is not fully comprehensive. This is also the direction we intend to pursue in our future work.

--

--