# US 2022/0032189 A1 · Scene update control method and apparatus, electronic device, and storage medium

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

- Number: US 2022/0032189 A1
- Document ID: US20220032189A1
- Status: Published application
- Kind: A1
- Application number: 17/501,633
- Filed: 2021-10-14
- Published: 2022-02-03
- Earliest claimed: 2019-12-05
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Runfa Yan; Jie Wang
- Web page: https://patentgrep.com/patent/US20220032189A1

## CPC

- A63F 13/52: involving aspects of the displayed game scene
- G06T 15/08: Volume rendering
- A63F 13/60: Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
- G06F 3/0656: {Data buffering arrangements}
- G06T 1/60: Memory management
- G06T 17/00: Three-dimensional [3D] modelling for computer graphics
- G06T 2200/04: involving 3D image data
- A63F: CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A scene update control method and apparatus, an electronic device, and a storage medium are provided. A scene is divided into a plurality of region blocks, each region block including a plurality of position coordinate pairs. A voxel file of a region block includes all voxels on the region block, and voxel files of the plurality of region blocks are stored on a magnetic disk according to an order in which the plurality of region blocks are to be updated in the scene. The voxel files of the plurality of region blocks are read from the magnetic disk and stored to a memory in advance. The scene is updated based on the voxel files of the plurality of region blocks from the memory.

## Claims

### Claim 1

A scene update control method, performed by an electronic device, the method comprising:
reading, in a process of updating a scene comprising a plurality of region blocks, voxel files of region blocks from a magnetic disk and storing the voxel files into a memory, voxels on each region block forming a voxel file, wherein a plurality of voxel files of the plurality of region blocks are stored on the magnetic disk according to an order in which the plurality of region blocks in the scene are to be updated;
determining, according to a region block to be updated in the scene, a target voxel file corresponding to the region block to be updated; and
obtaining voxels in the target voxel file from the memory, and updating the scene according to the obtained voxels.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the reading the voxel files comprises:
reading the voxel files and index files corresponding to the voxel files from the magnetic disk, and storing the voxel files and the index files that are read into the memory,
wherein each region block comprises a plurality of position coordinate pairs; an index file comprises indexes corresponding to the plurality of position coordinate pairs on a region block; an index corresponding to a position coordinate pair with voxels is an index corresponding to a starting voxel in all the voxels at the position coordinate pair; and an order of storing the index files on the magnetic disk is the same as an order of storing the voxel files on the magnetic disk.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the determining the target voxel file comprises:
based on a current position coordinate pair of a target object in the scene, determining, as region blocks to be updated, a specified quantity of surrounding region blocks centered around a region block in which the current position coordinate pair is located; and
determining voxel files corresponding to the specified quantity of surrounding region blocks as target voxel files.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the specified quantity of surrounding region blocks comprise N region blocks before the region block in which the current position coordinate pair is located and M region blocks after the region block in which the current position coordinate pair is located, M and N being integers.

### Claim 5 (depends on 2)

The method according to claim 2, wherein the obtaining the voxels comprises:
determining, for each position coordinate pair on a region block corresponding to the target voxel file, an index subscript corresponding to the each position coordinate pair and a quantity of voxels at the each position coordinate pair;
determining, according to the index subscript, an index corresponding to a position coordinate pair with voxels in an index file corresponding to the target voxel file, and determining a starting voxel at position coordinate pairs in the target voxel file according to the index; and
obtaining voxels at all position coordinate pairs from the memory according to the starting voxel and the quantity of voxels, and updating the scene according to the obtained voxels.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the reading the voxel files and the storing the voxel files into the memory comprises:
based on a memory pressure indicator being lower than a set upper limit threshold, and an occurrence of a page fault, reading the voxel files and the index files corresponding to the voxel files from the magnetic disk, and storing the voxel files and the index files into a user space of the memory.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the reading the voxel files and the storing the voxel files into the memory comprises:
based on a memory pressure indicator being greater than or equal to a set upper limit threshold, and voxels in the target voxel file being missed in a cache, reading the voxel files and the index files corresponding to the voxel files from the magnetic disk, and storing the voxel files and the index files into a cache space of the memory.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the reading the voxel files and the storing the voxel files into the memory comprises:
based on a memory pressure indicator being lower than a set upper limit threshold, and an occurrence of a page fault occurs, calling an mmap function of an operating system; reading, from the magnetic disk according to a size of each page in the operating system, voxel files corresponding to an integer number of region blocks that are centered around a region block in which a current position coordinate pair is located, and index files corresponding to the voxel files; and storing the voxel files and the index files into a user space of the memory.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the reading the voxel files and the storing the voxel files comprises:
based on a memory pressure indicator being greater than or equal to a set upper limit threshold, and voxels in the target voxel file being missed in a cache, reading voxel files of three consecutive region blocks centered around a region block in which a current position coordinate pair is located and index files corresponding to the voxel files from the magnetic disk; and storing the voxel files and the index files into a cache space of the memory.

### Claim 10

A scene update control apparatus, comprising:
at least one memory configured to store program code; and
at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:
reading code configured to cause the at least one processor to read, in a process of updating a scene comprising a plurality of region blocks, voxel files of region blocks from a magnetic disk and store the voxel files into a memory, voxels on each region block forming a voxel file, wherein a plurality of voxel files of the plurality of region blocks are stored on the magnetic disk according to an order in which the plurality of region blocks in the scene are to be updated;
determining code configured to cause the at least one processor to determine, according to a region block to be updated in the scene, a target voxel file corresponding to the region block to be updated; and
update code configured to cause the at least one processor to obtain voxels in the target voxel file from the memory, and update the scene according to the obtained voxels.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the reading code is further configured to cause the at least one processor to:
read the voxel files and index files corresponding to the voxel files from the magnetic disk, and store the voxel files and the index files that are read into the memory,
wherein each region block comprises a plurality of position coordinate pairs; an index file comprises indexes corresponding to position coordinate pairs on a region block; an index corresponding to a position coordinate pair with voxels is an index corresponding to a starting voxel in all the voxels at the position coordinate pair; and an order of storing the index files on the magnetic disk is the same as an order of storing the voxel files on the magnetic disk.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the determining code is further configured to cause the at least one processor to:
based on a current position coordinate pair of a target object in the scene, determining, as region blocks to be updated, a specified quantity of surrounding region blocks centered around a region block in which the current position coordinate pair is located; and
determine voxel files corresponding to the specified quantity of surrounding region blocks as target voxel files.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein the specified quantity of surrounding region blocks comprise N region blocks before the region block in which the current position coordinate pair is located and M region blocks after the region block in which the current position coordinate pair is located, M and N being integers.

### Claim 14 (depends on 11)

The apparatus according to claim 11, wherein the update code is further configured to:
determine, for each position coordinate pair on a region block corresponding to the target voxel file, an index subscript corresponding to the each position coordinate pair and a quantity of voxels at the each position coordinate pair;
determine, according to the index subscript, an index corresponding to a position coordinate pair with voxels in an index file corresponding to the target voxel file, and determine a starting voxel at position coordinate pairs in the target voxel file according to the index; and
obtain voxels at all position coordinate pairs from the memory according to the starting voxel and the quantity of voxels, and update the scene according to the obtained voxels.

### Claim 15 (depends on 10)

The apparatus according to claim 10, wherein the reading code is further configured to cause the at least one processor to:
based on a memory pressure indicator being lower than a set upper limit threshold, and an occurrence of a page fault, read the voxel files and the index files corresponding to the voxel files from the magnetic disk, and store the voxel files and the index files into a user space of the memory.

### Claim 16 (depends on 10)

The apparatus according to claim 10, wherein the reading code is further configured to cause the at least one processor to:
based on a memory pressure indicator being greater than or equal to a set upper limit threshold, and voxels in the target voxel file being missed in a cache, read the voxel files and the index files corresponding to the voxel files from the magnetic disk, and store the voxel files and the index files into a cache space of the memory.

### Claim 17 (depends on 10)

The device according to claim 10, wherein the reading code is further configured to cause the at least one processor to:
based on a memory pressure indicator being lower than a set upper limit threshold, and an occurrence of a page fault, call an mmap function of an operating system; read, from the magnetic disk according to a size of each page in the operating system, voxel files corresponding to an integer number of region blocks that are centered around a region block in which a current position coordinate pair is located, and index files corresponding to the voxel files; and store the voxel files and the index files into a user space of the memory.

### Claim 18 (depends on 10)

The device according to claim 10, wherein the reading code is further configured to cause the at least one processor to:
based on a memory pressure indicator being greater than or equal to a set upper limit threshold, and voxels in the target voxel file being missed in a cache, read voxel files of three consecutive region blocks centered around a region block in which a current position coordinate pair is located and index files corresponding to the voxel files from the magnetic disk; and store the voxel files and the index files into a cache space of the memory.

### Claim 19 (depends on 1)

An electronic device, comprising a storage and a processor, the storage being configured to store computer instructions executable by the processor to perform the scene update control method according to claim 1.

### Claim 20

A non-transitory computer-readable storage medium, storing computer instructions executable by at least one processor to perform a scene update control method, the method comprising:
reading, in a process of updating a scene comprising a plurality of region blocks, voxel files of region blocks from a magnetic disk and storing the voxel files into a memory, voxels on each region block forming a voxel file, wherein a plurality of voxel files of the plurality of region blocks are stored on the magnetic disk according to an order in which the plurality of region blocks in the scene are to be updated;
determining, according to a region block to be updated in the scene, a target voxel file corresponding to the region block to be updated; and
obtaining voxels in the target voxel file from the memory, and updating the scene according to the obtained voxels.
