Sharded Storage of Geolocation Data with Predictable Query Response Time

Through the geo-index framework and deterministic hashing technology shard storage method, fragmentation is dynamically expanded to maintain query response time, solving the unpredictable response time problem caused by the increase in data volume in parallel real-life games, and achieving efficient data storage and real-time query.

CN115175747BActive Publication Date: 2025-07-22NIANTIC INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202080097176.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-12-20
Filing Date
2020-12-18
Publication Date
2025-07-22
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

When traditional database storage methods face the increase in geolocation data in parallel real-world games, query response time is difficult to maintain predictable, affecting the game experience of real-time interaction.

Method used

Systems and methods are used for shard storage, and using geo-index framework and deterministic hashing technology, fragmentation is dynamically expanded to maintain query response time within the expected threshold, and data is evenly distributed through fragment counting and deterministic hashing to ensure the predictability of query response time.

Benefits of technology

It realizes the predictability of query response time in any number of geolocation data stores, supports efficient storage and real-time query of large-scale geographic area data, and meets the real-time interaction needs of parallel reality games.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115175747B_ABST
    Figure CN115175747B_ABST
Patent Text Reader

Abstract

A system allows indexing any number of items in a geographical region, which provides predictable query response times across a sharded database. Items indexed to the geographical region are stored on a single shard, and as long as an overflow condition indicating an undesired query response time is not met, additional items are added to that shard. If the overflow condition is met, the system extends the storage of items indexed to the geographical region to one or more additional shards in order to maintain predictable query response times. The system can maintain a shard count that represents the total number of shards used to store items corresponding to a geographical region, which can be used to query one or more related shards. The system can apply a deterministic hash in order to evenly distribute shards across database nodes of the sharded database.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross - reference to related applications

[0002] This application claims the benefit of U.S. Provisional Application No. 62 / 952,140, filed on December 20, 2019, which is hereby incorporated by reference in its entirety. Technical Field

[0003] The present disclosure generally relates to data storage, and more particularly to sharded storage of any number of geolocated items with predictable query response times. Background Art

[0004] Parallel reality games that provide a shared virtual world parallel to at least a portion of the real world can host a variety of interactions that can attract groups of players. Providing a geographical environment in the virtual world that is parallel to at least a portion of the real world allows players to navigate the virtual world by navigating the real world. Associating virtual elements in the virtual environment with real-world objects, locations, and actions in the real world can encourage players to travel and notice features in the real world that players would otherwise overlook. Providing virtual elements at the same location in the virtual world as their corresponding real-world objects or locations in the real world increases the impression that the virtual elements are hidden parts of the real world.

[0005] When playing a parallel reality game, a player's client device typically receives data corresponding to virtual elements near the player. As the density of virtual elements and the richness of available information increase, the amount of data in the game database also increases. Using traditional database storage, this results in an increase in query response time. However, since parallel reality games can be designed for real-time interaction between players and the virtual world, there is an upper limit on the acceptable response time. Therefore, there is a need for an efficient storage method that provides predictable query response times as the amount of data stored for a geographical area increases. Summary of the Invention

[0006] The above and other problems can be solved by a system and method for enabling any number of items to be indexed in a geographic area (e.g., using a geographic indexing framework such as the S2 library), the system and method providing predictable query response times across a sharded database. In various embodiments, items indexed to a geographic area are stored on a single shard, and additional items are added to the shard as long as an overflow condition indicating an undesirable query response time is not met (e.g., the query response time remains below a desired threshold). If the overflow condition is met, the system expands the storage of items indexed to the geographic area to one or more shards in order to maintain predictable query response times. The system can maintain a shard count that represents the total number of shards used to store items corresponding to a geographic area, which can be used to query one or more associated shards (e.g., in parallel). The system can apply a deterministic hash to evenly distribute shards across database nodes (such as virtual or physical database servers) of the sharded database. A client of the database can determine on which database nodes each shard corresponding to the geographic area is stored based on the shard count, rather than storing a list of each database node on which items for the geographic area are stored. This enables storing many items for large geographic areas while providing predictable response times, e.g., when querying a single shard or multiple shards in parallel.

[0007] In one embodiment, the system receives a request indicating a geolocation. Based on the geolocation, the system identifies a geographic area. Based on the geographic area, the system identifies a database shard among a plurality of database shards of the database, the plurality of database shards corresponding to the geographic area. The system queries the identified database shard for geolocation data corresponding to the geographic area, the query of the database shard having a predictable response time. Based on the queried geolocation data, the system processes the query results. The system returns the query results in response to the request. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a block diagram of a networked computing environment according to one embodiment in which game data for any number of geolocated items can be stored with predictable query response times.

[0009] Figure 2 depicts a representation of a virtual world having a geographic environment parallel to the real world according to one embodiment.

[0010] Figure 3 depicts an exemplary game interface for a parallel reality game according to one embodiment.

[0011] Figure 4 is according to one embodiment Figure 1Block diagram of a game database shown therein.

[0012] Figure 5 Flowchart of a method for providing game data for any number of geolocated items with predictable query times, according to one embodiment.

[0013] Figure 6 Shows an example computer suitable for use in a Figure 1 networked computing environment, according to one embodiment. Detailed Description

[0014] A game server can host a parallel reality game with a player game area that includes a virtual world having a geographical environment parallel to at least a portion of the real-world geographical environment. A player can navigate a series of coordinates defining virtual space in the virtual world by navigating a series of geographical coordinates in the real world. In particular, a positioning system (e.g., a GPS system) associated with the player's client device, which can be a mobile computing device, can be used to monitor or track the player's location. The player location information can be provided over a network to the game server hosting the parallel reality game and can be used by the game to update the player's location in the virtual world. Thus, as the player continuously moves within the coordinate range in the real world using their client device, the game server can be updated such that the player also continuously moves within the coordinate range in the parallel virtual world.

[0015] The virtual world can include one or more virtual elements associated with points of interest in the real world. For example, the virtual world can include various virtual elements associated with points of interest, such as landmarks, museums, artworks, libraries, or other areas of interest in the real world. The virtual elements associated with real-world points of interest can provide the illusion that the virtual world is a hidden dimension of the real world that players can interact with by playing the parallel reality game. For example, as the player navigates geographical coordinates in the real world, the player can discover and interact with the virtual elements provided in the parallel virtual world. As part of the parallel reality game, various game objectives can encourage the player to interact with these virtual elements. In some embodiments, the game server can orchestrate virtual events in the parallel reality game around real-world points of interest.

[0016] A virtual world can be divided into portions (e.g., cells) corresponding to adjacent geographical regions of the real world. In various embodiments, the portions of the virtual world are defined according to a geographical indexing framework. For example, the portions of the virtual world can be defined according to the S2 library, which defines a cell hierarchy that divides the three-dimensional object Earth into a set of two-dimensional cells at different levels of granularity. In other cases, different geographical indexing frameworks can be used. This portion of the virtual world can be used to index various geolocation data associated with the corresponding geographical region for storage, such as information associated with the virtual elements described above. Over time, new virtual elements can be added to the virtual world, and the amount of data associated with the virtual elements can increase. For example, the virtual elements can correspond to points of interest in the real world, and as the system learns about new points of interest, new virtual elements can be added (e.g., as submitted by the owner or manager of the point of interest through crowdsourcing or using any other suitable technique). Similarly, when new information associated with a virtual element is obtained (e.g., new photos, videos, historical information, etc.), it can be stored along with the virtual element. Thus, the amount of data corresponding to a portion of the virtual world can increase over time.

[0017] Using traditional methods, as the amount of data increases, the query response time for identifying that data also increases. However, to provide consistent performance for a parallel reality game, it is desirable to provide a predictable query response time regardless of the amount of data stored for any given portion of the virtual world. As described in more detail below, various embodiments provide a predictable query response time by limiting the amount of data stored in any given shard according to an overflow condition indicating an undesirable query response time. A shard count value can be stored for each portion, which can be used to identify one or more shards that include data for a given portion of the virtual world. A deterministic hashing method is used to identify one or more shards that include data for a given portion of the virtual world, and queries are made (e.g., in parallel) against the relevant data in the shards. Thus, the query response time is predictable regardless of how much data is stored for a given portion of the virtual world because the amount of data in any one shard does not exceed a threshold.

[0018] Although the described embodiments relate to accessing geolocation data for a parallel reality game, those skilled in the art will recognize that the same or similar techniques can be used for geolocation data for other purposes. For example, a travel guide application with geolocation information about local attractions, restaurants, museums, and other landmarks can be sharded in a similar manner to provide a predictable query response time.

[0019] Exemplary location - based parallel reality game system

[0020] A parallel reality game is a location-based game that has a virtual world geographical environment that is parallel to at least a portion of the real-world geographical environment such that a player's movement and actions in the real world affect actions in the virtual world and vice versa. Using the disclosure provided herein, one of ordinary skill in the art will understand that the described subject matter is applicable to other situations where it is desirable to verify a user's location. Additionally, the inherent flexibility of computer-based systems allows for a variety of possible configurations, combinations, and divisions of tasks and functions among the components of the system. For example, a system and method according to aspects of the present disclosure can be implemented using a single computing device or across multiple computing devices (e.g., connected in a computer network).

[0021] Figure 1 An embodiment of a networked computing environment 100 is shown in which a player's real-world location can be verified based on activities within a parallel reality game. The networked computing environment 100 provides for a player's interaction within a virtual world that has a geographical environment parallel to the real world. In particular, geographical regions in the real world can be directly associated or mapped to corresponding regions in the virtual world. A player can move within the virtual world by moving to various geographical locations in the real world. For example, a player's location in the real world can be tracked and used to update the player's location in the virtual world. Generally, a player's location in the real world is determined by finding the location of the client device 120 through which the player is interacting with the virtual world and assuming the player is at the same (or approximately the same) location. For example, in various embodiments, a player can interact with a virtual element if the player's location in the real world is within a threshold distance (e.g., ten meters, twenty meters, etc.) of the real-world location corresponding to the virtual location of the virtual element in the virtual world. For convenience, various embodiments are described with reference to "the player's location", but those skilled in the art will understand that such reference can refer to the location of the player's client device 120.

[0022] Now refer to Figure 2 , which depicts a conceptual diagram of a virtual world 210 that is parallel to the real world 200 and that can serve as a game board for players of a parallel reality game. As shown, the virtual world 210 can include a geographical environment that is parallel to the geographical environment of the real world 200. In particular, the coordinate ranges that define geographical regions or spaces in the real world 200 are mapped to corresponding coordinate ranges that define virtual spaces in the virtual world 210. The coordinate ranges in the real world 200 can be associated with towns, neighborhoods, cities, campuses, venues, countries, continents, the entire earth, or other geographical regions. Each geographical coordinate within the geographical coordinate range is mapped to a corresponding coordinate in the virtual space within the virtual world.

[0023] The position of the player in the virtual world 210 corresponds to the position of the player in the real world 200. For example, player A located at position 212 in the real world 200 has a corresponding position 222 in the virtual world 210. Similarly, player B located at position 214 in the real world has a corresponding position 224 in the virtual world. When the player moves within the geographical coordinate range in the real world, the player also moves within the coordinate range that defines the virtual space in the virtual world 210. In particular, when the player navigates the geographical coordinate range in the real world, a positioning system (e.g., GPS system) associated with the mobile computing device carried by the player can be used to track the player's position. The data associated with the player's position in the real world 200 is used to update the player's position within the corresponding coordinate range that defines the virtual space in the virtual world 210. In this way, the player can navigate a continuous trajectory within the coordinate range of the virtual space in the defined virtual world 210 by simply traveling within the corresponding geographical coordinate range in the real world 200 without having to register at a specific discrete location in the real world 200 or periodically update the position information.

[0024] Location-based games can include multiple game objectives that require the player to travel to various virtual elements and / or virtual objects scattered throughout the virtual world and / or interact with these virtual elements and / or virtual objects. The player can travel to these virtual locations by traveling to the corresponding locations of the virtual elements or objects in the real world. For example, the positioning system can continuously track the player's position such that as the player continuously navigates the real world, the player also continuously navigates the parallel virtual world. The player can then interact with various virtual elements and / or objects at specific locations to achieve or execute one or more game objectives.

[0025] For example, a game objective can require the player to capture virtual elements 230 located at various virtual locations in the virtual world 210 or to claim ownership of the virtual elements 230. These virtual elements 230 can be associated with landmarks, geographical locations, or objects 240 in the real world 200. The real-world landmarks or objects 240 can be artworks, monuments, buildings, enterprises, libraries, museums, or other suitable real-world landmarks or objects. To capture these virtual elements 230, the player must travel to the landmark or geographical location 240 associated with the virtual elements 230 in the real world and must perform any necessary interactions with the virtual elements 230 in the virtual world 210. For example, Figure 2Player A may have to travel to landmark 240 in the real world 200 in order to interact with or capture virtual element 230 associated with that particular landmark 240. Interaction with virtual element 230 may require actions in the real world, such as taking a photo and / or verifying, obtaining, or capturing other information about the landmark or object 240 associated with virtual element 230. In some embodiments, interaction with virtual element 230 may further prompt verification that the player's position in the real world 200 matches the player's position in the virtual world 210.

[0026] Game objectives may require a player to use one or more virtual items collected by the player in a location-based game. For example, a player may search for virtual items (such as weapons, creatures, power-ups, or other items) useful for completing game objectives in the virtual world 210. These virtual items may be found or collected by traveling to different locations in the real world 200 or by completing various actions in the virtual world 210 or the real world 200. In Figure 2 the example shown, the player uses virtual item 232 to capture one or more virtual elements 230. In particular, the player may deploy virtual item 232 at a location proximate to or within virtual element 230 in the virtual world 210. Deploying one or more virtual items 232 in this manner may result in the capture of virtual element 230 for a particular player or a particular player's team / faction.

[0027] In a particular implementation, a player may have to collect virtual energy as part of a parallel reality game. As Figure 2 shown, virtual energy 250 may be dispersed at different locations in the virtual world 210. The player may collect virtual energy 250 by traveling to the corresponding location of virtual energy 250 in the real world 200. Virtual energy 250 may be used to power virtual items and / or perform various game objectives in the game. A player who loses all virtual energy 250 may be disconnected from the game.

[0028] According to aspects of the present disclosure, a parallel reality game can be a large multi-player location-based game where each participant in the game shares the same virtual world. Players can be divided into separate teams or factions and can work together to achieve one or more game objectives, such as capturing or claiming ownership of virtual elements. In this way, a parallel reality game can inherently be a social game that encourages cooperation among in-game players. In a parallel reality game, players from opposing teams can compete against each other (or sometimes cooperate to achieve a common goal). Players can use virtual items to attack or impede the progress of players on the opposing team. In some cases, players are encouraged to gather at real-world locations for cooperative or interactive events in the parallel reality game. In these cases, the game server attempts to ensure that players are actually present and not cheating.

[0029] A parallel reality game can have various features to enhance and encourage gameplay within the parallel reality game. For example, players can accumulate virtual currency or another virtual reward that can be used throughout the game (e.g., to purchase items in the game). As players complete one or more game objectives and gain experience within the game, they can advance through various levels. In some embodiments, players can communicate with each other through one or more communication interfaces provided in the game. Players can also obtain enhanced "abilities" or virtual items that can be used to complete game objectives within the game. Using the disclosure provided herein, one of ordinary skill in the art should understand that various other game features can be included in a parallel reality game without departing from the scope of the present disclosure.

[0030] Figure 3 An embodiment of a game interface 300 is depicted, which can be presented on a display of a client 120 as part of an interface between a player and a virtual world 210. The game interface 300 includes a display window 310, which can be used to display the virtual world 210 and various other aspects of the game, such as player position 222 and the positions of virtual elements 230, virtual items 232, and virtual energy 250 in the virtual world 210. The user interface 300 can also display other information, such as game data information, game communication, player information, client location verification instructions, and other information associated with the game. For example, the user interface can display player information 315, such as player name, experience level, and other information. The user interface 300 can include a menu 320 for accessing various game settings and other information associated with the game. The user interface 300 can also include a communication interface 330 that enables communication between the game system and the player and between one or more players of the parallel reality game.

[0031] In accordance with aspects of the present disclosure, a player can interact with a parallel reality game by simply carrying the client device 120 and moving around in the real world. For example, a player can play the game by simply accessing an application associated with the parallel reality game on a smart phone and using the smart phone to move around in the real world. In this regard, it is not necessary for the player to continuously view a visual representation of the virtual world on a display screen in order to play a location-based game. Accordingly, the user interface 300 can include a plurality of non-visual elements that allow the user to interact with the game. For example, when a player approaches a virtual element or object in the game, or when an important event occurs in the parallel reality game, the game interface can provide an auditory notification to the player. The player can control these auditory notifications with the audio controls 340. Different types of auditory notifications can be provided to the user depending on the type of virtual element or event. The auditory notifications can increase or decrease in frequency or volume depending on the player's proximity to the virtual element or object. Other non-visual notifications and signals, such as vibration notifications or other suitable notifications or signals, can be provided to the user.

[0032] Using the disclosures provided herein, those of ordinary skill in the art will understand that, given the present disclosure, many game interface configurations and underlying functions will be apparent. The present disclosure is not intended to be limited to any one particular configuration.

[0033] Referring back to Figure 1 , the client 120 can be any portable computing device that a player can use to interact with the game system 100. For example, the client 120 can be a wireless device, a personal digital assistant (PDA), a portable gaming device, a cellular phone, a smart phone, a tablet computer, a navigation system, a handheld GPS system, a wearable computing device, a display with one or more processors, or other such devices. In short, the client 120 can be any computer device or system that enables a player to interact with the game system 100.

[0034] Client 120 may include one or more processors and one or more computer-readable media. The computer-readable media may store instructions that cause the processor to perform operations. Client 120 may include various input / output devices for providing and receiving information from a player, such as a display screen, a touch screen, a touchpad, data input keys, a speaker, a camera, and / or a microphone suitable for voice recognition. Client 120 may also include various other sensors for recording data from Client 120, including but not limited to a motion sensor, an accelerometer, a gyroscope, other inertial measurement units (IMUs), a barometer, a positioning system, a thermometer, a light sensor, etc. Client 120 may further include a network interface for providing communication via Network 130. The network interface may include any suitable components for interfacing with one or more networks, including, for example, a transmitter, a receiver, a port, a controller, an antenna, or other suitable components.

[0035] Because the networked computing environment 100 provides location-based games, Client 120 is preferably a portable computing device that can be easily carried or otherwise transported by a player, such as a smartphone or a tablet. In Figure 1 the illustrated embodiment, each Client 120 includes software components, such as a game module 122 and a positioning module 124. In other embodiments, Client 120 may include different or additional elements, such as a display (as a component of Client 120 or external to Client 120), various input devices (e.g., a touch screen, a mouse, a stylus, etc.).

[0036] The game module 122 provides an interface for a player to participate in a parallel reality game. The game server 110 transmits game data to Client 120 via Network 130 for use by the game module 122 at Client 120 to provide a local version of the game to a player at a location remote from the game server 110. Server 110 may include a network interface for providing communication via Network 130. The network interface may include any suitable components for interfacing with one or more networks, including, for example, a transmitter, a receiver, a port, a controller, an antenna, or other suitable components.

[0037] The game module 122 executed by the client 120 provides an interface between the player and the parallel reality game. The game module 122 can present a user interface on a display device associated with the client 120, which displays a virtual world associated with the game (e.g., presents an image of the virtual world), and allows the user to interact in the virtual world to perform various game objectives. The game module 122 can also control various other outputs to allow the player to interact with the game without the player having to watch the display screen. For example, the game module 122 can control various audio, vibration, or other notifications that allow the player to play the game without looking at the display screen. The game module 122 can access game data received from the game server 110 to provide an accurate representation of the game to the user. The game module 122 can receive and process player input and provide updates to the game server 110 via the network 130.

[0038] The positioning module 124 can be any device or circuit for monitoring the position of the client 120. For example, the positioning module 124 can determine the actual position or relative position by using a satellite navigation positioning system (e.g., GPS system, Galileo positioning system, Global Navigation Satellite System (GLONASS), Beidou satellite navigation and positioning system), an inertial navigation system, a dead reckoning system, based on an IP address, by using triangulation and / or proximity to a cellular tower or Wi-Fi hotspot, and / or other suitable technologies for determining the position. The positioning module 124 can also include various other sensors that can help to precisely locate the position of the client 120.

[0039] When the player moves around with the client 120 in the real world, the positioning module 124 tracks the player's position and provides the player position information to the game module 122. The game module 122 updates the player's position in the virtual world associated with the game based on the player's actual position in the real world. Thus, the player can simply interact with the virtual world by carrying or transporting the client 120 in the real world. In particular, the player's position in the virtual world can correspond to the player's position in the real world. The game module 122 can provide the player position information to the game server 110 via the network 130, such that the general game module 112 tracks the positions of all players throughout the game. It should be understood that the position information associated with the player is only used when the player has been notified and given permission to access the player's position information and how that position information will be utilized in the context of the game (e.g., updating the player's position in the virtual world). Additionally, any position information associated with the player will be stored and maintained in a manner that protects the player's privacy.

[0040] The networked computing environment 100 uses a client-server architecture, where a game server 110 communicates with one or more clients 120 via a network 130 to provide a parallel reality game to players at the clients 120. The networked computing environment 100 may also include other external systems, such as a sponsor / advertiser system or a commerce system. Although Figure 1 only one client 120 is shown, any number of clients 120 or other external systems may be connected to the game server 110 via the network 130. Additionally, the network computing environment 100 may contain different or additional elements and functions that may be distributed between the clients 120 and the server 110 in a manner different from that described below.

[0041] The game server 110 may be any computing device and may include one or more processors and one or more computer-readable media. The computer-readable media may store instructions that cause the processor to perform operations. The game server 110 may include a game database 115 or may communicate with a game database 115. The game database 115 stores game data used in the parallel reality game to be provided to the client(s) 120 via the network 130.

[0042] The game data stored in the game database 115 may include: (1) data associated with the virtual world in the parallel reality game (e.g., image data for rendering the virtual world on a display device, geographical coordinates of locations in the virtual world, etc.); (2) data associated with the players of the parallel reality game (e.g., player profiles, which include but are not limited to player information, player experience levels, player currency, the current player's location in the virtual world / real world, player energy levels, player preferences, team information, faction information, etc.); (3) data associated with game objectives (e.g., data associated with the current game objective, the status of the game objective, past game objectives, future game objectives, desired game objectives, etc.); (4) data associated with virtual elements in the virtual world (e.g., the location of the virtual element, the type of the virtual element, the game objective associated with the virtual element; the corresponding real-world location information of the virtual element; the behavior of the virtual element, the relatedness of the virtual element, etc.); (5) data associated with real-world objects, landmarks, and locations associated with virtual world elements (e.g., the location of the real-world object / landmark, the description of the real-world object / landmark, the relatedness of the virtual element associated with the real-world object, etc.); (6) the game state (e.g., the current number of players, the current status of the game objective, the player leaderboard, etc.); (7) data associated with player actions / inputs (e.g., the current player location, the past player location, player movement, player input, player queries, player communications, etc.); and (8) any other data used, associated with, or obtained during the implementation of the parallel reality game. The game data stored in the game database 115 may be populated offline or in real time by a system administrator, and / or by data received from the users / players of the system 100, such as data received from one or more clients 120 via the network 130.

[0043] The game server 110 may be configured to receive requests for game data from one or more clients 120 (e.g., via a remote procedure call (RPC)) and respond to these requests via the network 130. For example, the game server 110 may encode the game data in one or more data files and provide the data files to the clients 120. In addition, the game server 110 may be configured to receive game data (e.g., player location, player actions, player input, etc.) from one or more clients 120 via the network 130. For example, the client 120 may be configured to periodically send player input and other updates to the game server 110, and the game server 110 uses the player input and other updates to update the game data in the game database 115 to reflect any and all changed conditions for the game.

[0044] In the illustrated embodiment, the server 110 includes a general game module 112, a commercial game feature module 114, a data collection module 116, an event module 118, and a query module 119. The game server 110 accesses game data from a remote distributed game database 115. The following reference Figure 4 more specifically describes various embodiments of the query module 119 and the game database 115. In other embodiments, the game server 110 includes different and / or additional elements. Additionally, the functionality may be distributed among the elements in a different manner than described. For example, the game database 115 may be integrated into the game server 110.

[0045] The general game module 112 hosts a parallel reality game for all players and serves as the authoritative source for the current state of the parallel reality game for all players. The general game module 112 receives game data (e.g., player input, player location, player actions, landmark information, etc.) from the client 120 and incorporates the received game data into the overall parallel reality game for all players. The general game module 112 may also manage the delivery of game data to the client 120 over the network 130. The general game module 112 may also manage the security aspects of the client 120, including but not limited to protecting the connection between the client 120 and the game server 110, establishing connections between various clients 120, and verifying the location of various clients 120.

[0046] In embodiments that include the commercial game feature module 114, the commercial game feature module 114 may be separate from or part of the general game module 112. The commercial game feature module 114 may manage various in-game features within the parallel reality game that are associated with real-world commercial activities. For example, the commercial game feature module 114 may receive requests from external systems such as sponsors / advertisers, enterprises, or other entities via the network 130 (via a network interface) to include game features associated with commercial activities in the parallel reality game. The commercial game feature module 114 may then be arranged to include these game features in the parallel reality game.

[0047] The game server 110 may also include a data collection module 116. In embodiments including the data collection module 116, the data collection module 116 may be separate from or a part of the general game module 112. The data collection module 116 may manage various game features included in the parallel reality game that are associated with data collection activities in the real world. For example, the data collection module 116 may modify the game data stored in the game database 115 to include game features associated with data collection activities in the parallel reality game. The data collection module 116 may also analyze the data collected by players according to the data collection activities and provide the data for access by various platforms.

[0048] The event module 118 manages players' access to events in the parallel reality game. Although the term "event" is used for convenience, it should be understood that this term does not necessarily refer to a specific event at a specific location or time. Instead, it may refer to any provision for accessing controlled game content, where one or more access criteria are used to determine whether a player can access the content. Such content may be part of a larger parallel reality game that includes game content with less or no access control, or may be a stand-alone, access-controlled parallel reality game.

[0049] The query module 119 constructs and executes queries on the game database 115 and provides the results to other components of the networked computing environment 100 (e.g., to the game module 122 of the client device 120 for a parallel reality game). Figure 4An embodiment of the game database 115 is shown. In the illustrated embodiment, the game database 115 includes N nodes 410A - 410N. Each node 410 can be a different physical machine or a different virtual machine. Thus, the nodes 410 can be queried independently. When geolocation data for a shard corresponding to a unit indicating a geographic region is added to a node 410, the query module 119 monitors an overflow condition for that node, which indicates the response time for queries of the data stored on that node and for which it is undesirable to extend the query for that shard. The overflow condition can be a limit on any of the following: the amount of data stored on the node, the number of items stored on the node, the query response time for queries on the node, or any other suitable parameter indicating the amount of data stored on the node and thus the expected query response time. If the overflow condition is met, the query module 119 increments the shard count for that unit and starts a new shard for that unit on a different node 410. Thus, as the amount of data for a given unit increases, the number of nodes 410 on which geolocation data corresponding to that unit is stored increases dynamically, while the amount of data on any one node is limited such that the query response time remains predictable. In some embodiments, the query module 119 sets a flag (e.g., a stored parameter) associated with the shard on the node indicating that the shard associated with the unit has been extended to another node. For example, when storing new data for a unit, the query module 119 can check whether one or more shared flags associated with the unit are set. In this case, if the query module 119 determines that the flag for a particular shard is set, it can attempt to store the data on another shard until the query module 119 identifies a shard for which the flag is not set or has generated a new shard for that unit.

[0050] Return reference Figure 1, in response to a request received from the client device 120, the query module 119 generates a query for geolocation data based on the location of the client device 120. The query can retrieve, update, or otherwise manipulate the geolocation data. The query module 119 further provides a query response to the client device 120 based on the processing of the queried geolocation data, such as a query response including the requested geolocation data. In one embodiment, the query module 119 receives a location from the client 120 (e.g., a GPS location generated by the location module 124) and identifies one or more portions of interest in the virtual world based on that location, such as by querying a geocell index to find the cells representing the portions of the virtual world corresponding to the geographic region including that location. For example, in the case of using S2 cells, the query module may identify the S2 cell at a specified level (e.g., level 12) where the client 120 is located, any S2 cell at a specified level (e.g., level 16) at least a portion of which is within a specified radius (e.g., two kilometers) of that location, any S2 cell at a specified level that is entirely within the specified radius, or any other suitable set of S2 cells (e.g., within an ellipse considering the current direction of travel of the client).

[0051] Each S2 cell has a cell ID. The query module 119 also stores a fragment number indicating the number of fragments of data for the cell. The query module 119 uses the cell ID and the fragment number to generate a unique keyword for each fragment including the data for the cell. One or more unique keywords can be generated by combining the cell ID with each integer value from zero to the fragment number. For example, for cell ID 7686 and fragment number 3, three keywords such as 7686-0, 7686-1, and 7686-2 can be generated. Any suitable combination method for generating unique keywords can be used, such as concatenation.

[0052] The query module 119 determines on which node of the distributed database 115 each fragment with relevant data is located based on the unique keyword. In some embodiments, the query module 119 applies a deterministic hashing technique to convert the unique keyword into a slot number. For example, the database 115 may have a maximum number of slots (e.g., 16565), and the query module 119 may apply a modular hashing technique to the unique keyword using the maximum number of slots to generate a slot number (e.g., unique keyword modulo the maximum slot number). In other embodiments, other deterministic hashing techniques may be used to convert the unique keyword into a slot number.

[0053] The query module 119 stores mappings indicating which nodes 410 of the database 115 store each slot. Based on the mappings, the query module 119 makes parallel queries to each of the indicated nodes 410 for data for the unit. Each query in the parallel query has a predictable response time, and by extension, the entire parallel query has a predictable response time due to the monitoring of overflow conditions by the query module 119 described above. Each parallel query returns geolocation data for the shards stored by the corresponding node 410. The query module 119 aggregates (e.g., joins) the results from each query and provides them to the requesting client 120.

[0054] The network 130 can be any type of communication network, such as a local area network (e.g., an intranet), a wide area network (e.g., the Internet), or some combination thereof. The network can also include a direct connection between the client 120 and the game server 110. In general, communication between the game server 110 and the client 120 can be carried out via a network interface using any type of wired and / or wireless connection, using a variety of communication protocols (e.g., TCP / IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML, JSON), and / or security schemes (e.g., VPN, secure HTTP, SSL).

[0055] The techniques discussed herein relate to servers, databases, software applications, and other computer-based systems, as well as actions taken to and information sent from such systems. Those of ordinary skill in the art will recognize that the inherent flexibility of computer-based systems allows for a variety of possible configurations, combinations, and divisions of tasks and functions among and within components. For example, the server processes discussed herein can be implemented using a single server or multiple servers working in combination. Unless otherwise specified, databases and applications can be implemented on a single system or distributed across multiple systems. Similarly, distributed components can operate sequentially or in parallel.

[0056] In addition, in cases where the systems and methods discussed herein access and analyze personal information about a user or utilize personal information such as location information, an opportunity may be provided to the user to control whether a program or feature collects information and to control whether and / or how content is received from the system or other applications. Such information or data will not be collected or used until the user is provided with meaningful notice about what information is to be collected and how that information will be used. The information will not be collected or used unless the user provides consent, and the user may revoke or modify that consent at any time. Thus, the user can control how information about the user is collected and used by an application or system. In addition, before certain information or data is stored or used, it may be processed in one or more ways to remove personally identifiable information. For example, the identity of the user may be processed such that no personally identifiable information can be determined for the user.

[0057] Example method

[0058] Figure 5 An example method 500 for providing geolocation data including any number of items with a predictable query response time is shown. The steps are shown from the perspective of a query module 119 that executes the method 500. However, some or all of the steps may be performed by other entities and / or components. In addition, some embodiments may perform these steps in parallel, perform these steps in a different order, or perform different steps. Figure 5

[0059] In Figure 5 the embodiment shown, the method 500 begins with the query module 119 receiving a request indicating geolocation (e.g., GPS coordinates of the client 120). As previously described, the request may describe various database queries, such as requests to retrieve, update, or otherwise modify geolocation data. The query module 119 identifies 520 one or more geographic regions based on the geolocation. For example, as previously described, the geographic region may be an S2 cell of a specified level within a predetermined distance of the location.

[0060] The query module 119 identifies one or more database shards of the 530 database, where each of the one or more database shards corresponds to a respective geographical region of one or more geographical regions. As described previously, deterministic hashing techniques can be used to identify the shards. The query module 119 queries 540 the identified shards for geolocation data corresponding to one or more geographical regions, where the query 540 has a predictable query response time. As described above, if the identified database shards include multiple database shards, the query module 119 can query the multiple shards in parallel. The query module 119 processes 550 the query results using the queried geolocation data and returns 560 the query results as a response to the received request. For example, if the query module 119 queries multiple shards in parallel, the query module 119 can aggregate the query results from each of the parallel queries (e.g., the geolocation data retrieved from each of the respective shards) into an overall query result and provide the overall query result as a response to the received request.

[0061] Example computing system

[0062] Figure 6 is a block diagram that illustrates components of an example machine capable of reading instructions from a machine-readable medium and executing them in a processor (or controller). Specifically, Figure 6 FIG. shows a pictorial representation of a machine in the form of an example computer system 600. The computer system 600 can be used to execute instructions 624 (e.g., program code or software) to cause the machine to perform any method (or process) described herein. The machine can operate as a stand-alone device or in conjunction with other connected (e.g., networked) devices to provide the described functionality. The machine can operate as a server or a client in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment.

[0063] The machine can be a server computer, a client computer, a personal computer (PC), a tablet PC, a smartphone, a network router, or any other machine capable of executing instructions 1024 (sequential or otherwise) that specify actions to be taken by the machine. Further, although only a single machine is shown, the term "machine" shall also be understood to include any collection of machines that individually or jointly execute instructions 624 to perform any one or more of the methods discussed herein.

[0064] The example computer system 600 includes one or more processing units (generally one or more processors 602). The processor 602 is, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a controller, a state machine, one or more application specific integrated circuits (ASICs), one or more radio frequency integrated circuits (RFICs), or any combination thereof. Any reference herein to the processor 602 may refer to a single processor or multiple processors. The computer system 600 also includes a main memory 604. The computer system may include a storage unit 616. The processor 602, the memory 604, and the storage unit 616 communicate via a bus 608.

[0065] In addition, the computer system 600 may include a static memory 606, a display driver 610 (e.g., for driving a plasma display panel (PDP), a liquid crystal display (LCD), or a projector). The computer system 600 may also include an alphanumeric input device 612 (e.g., a keyboard), a cursor control device 614 (e.g., a mouse, a trackball, a joystick, a motion sensor, a touch screen, or other pointing device), a signal generation device 618 (e.g., a speaker), and a network interface device 620, which are also configured to communicate via the bus 608. The computer system 600 may also include other input devices / sensors, such as a microphone, a camera, a barometer, a gyroscope, an accelerometer, etc.

[0066] The storage unit 616 includes a machine-readable medium 622 on which instructions 624 (e.g., software) are stored that implement any one or more of the methods or functions described herein. During execution of the instructions 624 by the computer system 600, the instructions 624 may also reside entirely or at least partially within the main memory 604 or within the processor 602 (e.g., in a cache memory of the processor), and the main memory 604 and the processor 602 also constitute machine-readable media. The instructions 624 may be transmitted or received via the network interface device 620 over a network 130.

[0067] Although the machine-readable medium 622 is shown as a single medium in the example embodiment, the term "machine-readable medium" should be understood to include a single medium or multiple media (e.g., a centralized or distributed database, or associated caches and servers) that are capable of storing the instructions 624. The term "machine-readable medium" should also be understood to include any medium that is capable of storing the instructions 624 for execution by a machine and that causes the machine to perform any one or more of the methods disclosed herein. The term "machine-readable medium" includes, but is not limited to, data repositories in the form of solid state memories, optical media, and magnetic media.

[0068] Other considerations

[0069] For purposes of illustration, the foregoing description of the embodiments has been presented; it is not intended to be exhaustive or to limit the patent rights to the precise forms disclosed. Those skilled in the relevant art will appreciate that many modifications and variations are possible in light of the above disclosure.

[0070] Some portions of this specification describe embodiments in terms of algorithms and symbolic representations of operations on information. These algorithmic descriptions and representations are commonly used by those skilled in the data processing arts to effectively convey the substance of their work to others skilled in the art. These operations, while described functionally, computationally, or logically, are understood to be implemented by computer programs or equivalent circuitry, microcode, etc. Additionally, it is sometimes convenient to refer to these operational arrangements as modules, without loss of generality. The described operations and their associated modules can be embodied in software, firmware, hardware, or any combination thereof.

[0071] Any steps, operations, or processes described herein can be performed or implemented singly or in combination with other devices by one or more hardware or software modules. In one embodiment, a software module is implemented using a computer program product that includes a computer-readable medium having computer program code thereon, which can be executed by a computer processor to perform any or all of the described steps, operations, or processes.

[0072] Embodiments may also relate to apparatus for performing the operations herein. Such apparatus may be specially configured for the required purposes, and / or it may comprise a general-purpose computing device selectively activated or reconfigured by a computer program stored in a computer. Such a computer program may be stored in a non-transitory, tangible computer-readable storage medium, or in any type of medium suitable for storing electronic instructions, which may be coupled to a computer system bus. Additionally, any computing system mentioned in the specification may include a single processor, or may be an architecture employing a multi-processor design to enhance computing capabilities.

[0073] Embodiments may also relate to products produced by the computing processes described herein. Such products may include information produced by a computing process, where the information is stored on a non-transitory, tangible computer-readable storage medium and may include any embodiment of a computer program product or other data combinations described herein.

[0074] As used herein, any reference to "an embodiment" or "embodiments" means that the particular element, feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. The phrase "in one embodiment" appearing in different places in the specification is not necessarily all referring to the same embodiment. Similarly, the use of "a" or "an" before an element or component is done merely for convenience. This description should be understood to mean that there is one or more elements or components, unless it is clearly otherwise indicated.

[0075] When values are described as "approximate" or "substantially" (or their derivatives), those values should be interpreted as being precise to + / - 10%, unless another meaning is apparent from the context. For example, "about 10" should be understood to mean "in the range from 9 to 11".

[0076] As used herein, the terms "comprises", "comprising", "includes", "including", "has", "having", or any other variation thereof are intended to cover a non-exclusive inclusion. For example, a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Further, unless there is a clear statement to the contrary, "or" refers to an inclusive or rather than an exclusive or. For example, the condition A or B is satisfied by any of the following: A is true (or present) and B is false (or absent), A is false (or absent) and B is true (or present), and both A and B are true (or present).

[0077] After reading this disclosure, those skilled in the art will appreciate that additional alternative structural and functional designs can be used to employ the described techniques and methods. Thus, although specific embodiments and applications have been illustrated and described, it should be understood that the described subject matter is not limited to the exact configurations and components disclosed. The scope of protection should be defined only by the following claims.

[0078] Finally, the language used in the specification has been principally selected for readability and guidance purposes, rather than to describe or limit the patent right. Thus, the scope of the patent right is not defined by this detailed description, but by any claims issued from this application based thereon. Thus, the disclosure of embodiments is intended to illustrate rather than limit the scope of the patent right set forth in the appended claims.

Claims

1. A method for retrieving geolocation data based on geolocation, the method comprising: Receiving, from a client device, a request for the geolocation data based on the geolocation; Identifying a geographic region based on the geolocation; Identifying a plurality of database shards from a set of database shards storing geolocation data for geographic regions, each of the identified plurality of database shards including geolocation data corresponding to the geographic region; Performing parallel queries on the identified plurality of database shards, each parallel query querying a database shard for geolocation data corresponding to the geographic region, wherein each parallel query for querying a database shard has a predictable response time not exceeding a threshold; And Returning a query result in response to the request.

2. The method according to claim 1, wherein the identified database shards store a data volume according to an overflow condition indicating a query response time not exceeding the threshold; and wherein each parallel query for querying a database shard has the predictable response time not exceeding the threshold due to the overflow condition of the identified database shards.

3. The method according to claim 1, further comprising: Evaluating geolocation data stored within database shards of the plurality of database shards according to an overflow condition, the overflow condition indicating that a response time for a query for the database shard exceeds the threshold; Based on the evaluation, determining that the geolocation data stored within the database shard satisfies the overflow condition; In response to determining that the overflow condition is satisfied, adding a new database shard to the plurality of database shards corresponding to the geographic region; And In response to receiving additional geolocation data associated with the geographic region for storage, storing the additional geolocation data in the new database shard.

4. The method according to claim 3, wherein the overflow condition includes one or more of the following: a threshold memory size of geolocation data stored within the database shard, a threshold number of database records stored within the database shard, or a threshold query response time for a query for the database shard.

5. The method according to claim 3, further comprising: In response to determining that the geolocation data satisfies the overflow condition, setting a flag associated with the database shard, the flag indicating that the number of database shards corresponding to the geographic region has increased.

6. The method according to claim 1, wherein the request includes a unit level indicating the size of the geographic region, and wherein identifying the geographic region includes: Querying a geographic unit index for a geographic unit corresponding to the geographic region using the geolocation and the unit level.

7. The method according to claim 6, wherein the geographic unit is associated with a unit identifier and a number of database shards, and wherein performing parallel queries on the identified plurality of database shards includes: For each of the identified multiple database shards: Determine a unique key for the database shard for the geographical unit based on the unit identifier and the number of database shards associated with the geographical unit; Determine the database node storing the database shard corresponding to the unique key; And Query the database node for geolocation data included in the database shard corresponding to the unique key.

8. The method according to claim 7, wherein determining the database node storing the database shard corresponding to the unique key includes: Generating a slot number by applying the unique key and the maximum slot number of the database node to a hash function; And Comparing the slot number with a database map indicating that the database slot associated with the slot number is stored on the database node.

9. The method according to claim 1, wherein the geolocation corresponds to the geographical location of the client device.

10. The method according to claim 1, wherein the geolocation data includes one or more virtual elements associated with a location within the geographical area.

11. The method according to claim 10, wherein the one or more virtual elements are associated with the virtual world of an augmented reality game application on the client device.

12. The method according to claim 11, wherein the one or more virtual elements are associated with locations within a threshold distance of the geographical location of the client device.

13. A non-transitory computer-readable storage medium comprising instructions that, when executed by a computer processor, cause the processor to perform operations, the operations including: Receiving, from a client device, a request for geolocation data based on geolocation; Identifying a geographical area based on the geolocation; Identifying a plurality of database shards from a set of database shards storing geolocation data for the geographical area, each of the identified plurality of database shards including geolocation data corresponding to the geographical area; Performing parallel queries on the identified plurality of database shards, each parallel query querying a database shard for geolocation data corresponding to the geographical area, wherein each parallel query for querying a database shard has a predictable response time not exceeding a threshold; And Returning a query result in response to the request.

14. The computer-readable storage medium according to claim 13, wherein the identified database shards store a data volume according to an overflow condition indicating a query response time not exceeding the threshold; and wherein each parallel query for querying a database shard has the predictable response time not exceeding the threshold due to the overflow condition of the identified database shards.

15. The computer-readable storage medium according to claim 13, wherein the instructions further cause the processor to perform operations, the operations including: Evaluate the geolocation data within a database fragment stored in the plurality of database fragments according to an overflow condition, the overflow condition indicating that the response time of a query for the database fragment exceeds the threshold; Based on the evaluation, determine that the geolocation data stored within the database fragment satisfies the overflow condition; In response to determining that the overflow condition is satisfied, add a new database fragment to the plurality of database fragments corresponding to the geographical region; And In response to receiving additional geolocation data associated with the geographical region for storage, store the additional geolocation data in the new database fragment.

16. The computer-readable storage medium according to claim 15, wherein the overflow condition includes one or more of the following: a threshold memory size of geolocation data stored within the database fragment, a threshold number of database records stored within the database fragment, or a threshold query response time for a query for the database fragment.

17. The computer-readable storage medium according to claim 15, wherein the instructions further cause the processor to perform operations, the operations including: In response to determining that the geolocation data satisfies the overflow condition, set a flag associated with the database fragment, the flag indicating that the number of database fragments corresponding to the geographical region has increased.

18. The computer-readable storage medium according to claim 13, wherein the request includes a unit level indicating the size of the geographical region, and wherein identifying the geographical region includes: Query a geographical unit index for geographical units corresponding to the geographical region using the geolocation and the unit level.

19. The computer-readable storage medium according to claim 18, wherein the geographical unit is associated with a unit identifier and the number of database fragments, and wherein performing a parallel query on the identified plurality of database fragments includes: For each database fragment of the identified plurality of database fragments: Based on the unit identifier and the number of database fragments associated with the geographical unit, determine a unique key for the database fragment for the geographical unit; Determine a database node storing the database fragment corresponding to the unique key; And Query the database node for geolocation data included in the database fragment corresponding to the unique key.

20. The computer-readable storage medium according to claim 19, wherein determining the database node storing the database fragment corresponding to the unique key includes: Generating a slot number by applying the unique key and the maximum slot number of the database node to a hash function; And Comparing the slot number with a database map, the database map indicating that a database slot associated with the slot number is stored on the database node.

21. The computer-readable storage medium according to claim 13, wherein the geolocation data includes one or more virtual elements associated with a location within the geographical area.

22. The computer-readable storage medium according to claim 21, wherein the one or more virtual elements are associated with a virtual world of an augmented reality game application on the client device.

Citation Information

Patent Citations

  • Virtual world query response system

    US20120054217A1

  • Geographically partitioned onlne search system

    US20130073581A1

  • Database Sharding

    US20190121901A1