# US 10,455,003 B2 · Method, server, and system for sharing resource data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,455,003 B2
- Document ID: US10455003B2
- Status: Granted
- Kind: B2
- Application number: 15/300,062
- Filed: 2015-03-31
- Published: 2017-05-25
- Granted: 2019-10-22
- Earliest claimed: 2014-04-02
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Xichang Mo; Zheng Zhang
- Web page: https://patentgrep.com/patent/US10455003B2

## CPC

- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0631: {by allocating resources to storage systems}
- G06F 3/0647: {Migration mechanisms}
- G06F 3/0685: {Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays}
- G06F 9/544: {Buffers; Shared memory; Pipes}
- G06F 9/5016: {the resource being the memory}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, a server, and a system for sharing resource data are provided. The method includes: preconfiguring a resource configuration file, reading a preset key value and an index name in the resource configuration file; requesting a memory space from an operating system according to the preset key value to create a shared memory; and loading resource data corresponding to the index name from a magnetic disk to the shared memory, and sharing the resource data with a process of each scene server on a same physical machine.

## Claims

### Claim 1

A method for sharing resource data, applicable to a resource loading server that comprises one or more program instructions, a memory and one or more processors, the one or more program instructions being stored in the memory and executed by the one or more processors, the method comprising:
reading a preset key value and an index name of resource data from a resource configuration file, wherein the resource configuration file is a resource configuration file preconfigured, the resource data is same logical data needed for processes of scene servers on a same physical machine as the resource loading server, and each scene server runs a corresponding process;
requesting a memory space from an operating system of the resource loading server according to the preset key value to create a shared memory;
loading the resource data corresponding to the index name from a magnetic disk to the shared memory;
setting a signal amount and creating a signal amount key value corresponding to the signal amount, an initial value of the signal amount being a total number of the processes corresponding to the scene servers executed on the physical machine;
storing the signal amount in the memory space of the operating system according to the signal amount key value;
for each scene server:
executing a wait operation on the signal amount and subtracting 1 from the signal amount in response to the scene server accessing a non-zero signal value in the signal amount according to the signal amount key value; and
sending a process start command to the scene server after the wait operation is completed for starting the process corresponding to the scene server; and
sharing the resource data with the processes of the scene servers on the same physical machine, wherein the signal amount becomes 0 after all of the processes of the scene servers have been started.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the sharing the resource data with the processes of the scene servers on the same physical machine, comprises:
mapping, when the process of each scene server accesses the shared memory by using the preset key value, the resource data to a memory space of each scene server.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the resource data comprises:
planning configuration data, art resource data, and map resource data.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the physical machine is an online game server, and the planning configuration data, the art resource data, and the map resource data are data needed for an online game.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the resource data is static read-only data.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
loading running data corresponding to each of the scene servers, wherein the running data is dynamic writeable data, and each scene server loads different running data.

### Claim 7

A method for sharing resource data, applicable to each scene server of a plurality of scene servers on a same physical machine, the method comprising:
reading a signal amount key value from a resource loading server on the same physical machine;
periodically accessing a signal amount from a memory space on the same physical machine according to the signal amount key value at a preset time interval;
if the signal amount has a non-zero value, receiving a start process command from the resource loading server and starting a corresponding process of the scene server, the start process command being sent from the resource loading server after the resource loading server executing a wait operation on the signal amount by subtracting 1 from the signal amount;
reading a preset key value in a resource configuration file preconfigured by the resource loading server, the resource configuration file comprising the preset key value and an index name of resource data, and the resource data being same logical data needed for the plurality of scene servers on the same physical machine;
accessing a shared memory according to the preset key value, the shared memory being created by the resource loading server according to the preset key value, the shared memory storing the resource data loaded, according to the index name, by the resource loading server from a magnetic disk; and
mapping the resource data in the shared memory to a memory space on the scene server.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the resource data is static read-only data.

### Claim 9 (depends on 7)

The method according to claim 7, wherein the physical machine is an online game server, and the resource data comprises:
planning configuration data, art resource data, and map resource data needed for an online game.

### Claim 10 (depends on 7)

The method according to claim 7, further comprising:
loading running data corresponding to the scene server, the running data being dynamic writeable data specific to the scene server.

### Claim 11

A computer system, comprising: a resource loading server and a plurality of scene servers, wherein:
the resource loading server and the plurality of scene servers reside on the same physical machine;
the resource loading server is configured to:
read a preset key value and an index name of resource data from a resource configuration file, wherein the resource data is same logical data needed for processes of the scene servers, and each scene server runs a corresponding process;
request a memory space of an operating system according to the preset key value to create a shared memory;
load the resource data corresponding to the index name from a magnetic disk to the shared memory;
set a signal amount;
create a signal amount key value corresponding to the signal amount, an initial value of the signal amount being a total number of the processes corresponding to the scene servers; and
store the signal amount in the memory space of the operating system according to the signal amount key value; and
each scene server is configured to periodically access the signal amount according to the signal amount key value at a preset time interval;
the resource loading server is further configured to execute a wait operation on the signal amount to subtract 1 from the signal amount in response to one scene server accessing a non-zero signal value in the signal amount; and send a process start command to the one scene server after the wait operation is completed; and
each scene server is further configured to start the corresponding process after receiving the process start command from the resource loading server, wherein the resource data is shared with the corresponding processes of the plurality of scene servers, and the signal amount becomes 0 after all of the processes of the scene servers have been started.

### Claim 12 (depends on 11)

The computer system according to claim 11, wherein each scene server is further configured to:
read the preset key value in the resource configuration file;
access the shared memory according to the preset key value; and
map the resource data in the shared memory to a memory space on the scene server.

### Claim 13 (depends on 11)

The computer system according to claim 11, wherein the resource data is static read-only data.

### Claim 14 (depends on 11)

The computer system according to claim 11, wherein the physical machine is an online game server, and the resource data comprises:
planning configuration data, art resource data, and map resource data needed for an online game.

### Claim 15 (depends on 11)

The computer system according to claim 11, wherein each scene server is further configured to:
load corresponding running data, the running data being dynamic writeable data specific to the scene server,
wherein each scene server loads different running data.
