CN109446452B - Path finding data processing method and device, electronic equipment and storage medium - Google Patents

Path finding data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109446452B
CN109446452B CN201811326617.7A CN201811326617A CN109446452B CN 109446452 B CN109446452 B CN 109446452B CN 201811326617 A CN201811326617 A CN 201811326617A CN 109446452 B CN109446452 B CN 109446452B
Authority
CN
China
Prior art keywords
data
tile
block
matrix
image block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811326617.7A
Other languages
Chinese (zh)
Other versions
CN109446452A (en
Inventor
吴昊泰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811326617.7A priority Critical patent/CN109446452B/en
Publication of CN109446452A publication Critical patent/CN109446452A/en
Application granted granted Critical
Publication of CN109446452B publication Critical patent/CN109446452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The disclosure relates to a way-finding data processing method and device, electronic equipment and a storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: splitting routing data into a header file and a data file, wherein the header file comprises the header data in the routing data and offsets of the tile data corresponding to a plurality of tiles, and the data file comprises the tile data corresponding to the plurality of tiles; and loading the header file, determining a pattern block matrix consisting of a preset number of pattern blocks according to the position of the virtual role, and loading pattern block data corresponding to the pattern block matrix. The data loading amount is reduced, and the memory consumption is also reduced.

Description

Path finding data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a way finding data processing method, a way finding data processing apparatus, an electronic device, and a computer-readable storage medium.
Background
Most of the existing 3D world way finding is realized by a Recast and Detour system, the Recast system is responsible for abstracting the 3D world into a navigation grid (NaviMesh), and the Detour system provides the function of finding ways on the navigation grid.
When the existing Recast and Detour system runs, the navigation grid NaviMesh data is loaded in a full amount, and the memory is occupied in a map of the world. For example, in a 2000 x 2000 world, the original data size of its way-finding graph is 68M. At real run-time, the size of the processed data loaded into memory may double. For a mobile phone game with limited memory resources, if a large amount of memory is occupied by full-loading data, the memory overhead is large, so that the system stability is influenced, the data loading speed and efficiency are reduced, and the smoothness of game application is influenced.
It should be noted that the data disclosed in the above background section are only for enhancement of understanding of the background of the present disclosure, and therefore may include data that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a method and an apparatus for processing way-finding data, an electronic device, and a storage medium, so as to overcome, at least to some extent, the problem of large memory occupied by way-finding data loading due to limitations and defects of the related art.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a way-finding data processing method, including: splitting routing data into a header file and a data file, wherein the header file comprises the header data in the routing data and offsets of the tile data corresponding to a plurality of tiles, and the data file comprises the tile data corresponding to the plurality of tiles; and loading the header file, determining a pattern block matrix consisting of a preset number of pattern blocks according to the position of the virtual role, and loading pattern block data corresponding to the pattern block matrix.
In an exemplary embodiment of the present disclosure, splitting the routing data into a header file and a data file includes: acquiring head data in the way searching data, wherein the head data comprises an origin position of a way searching graph, a size of a graph block and a width of a graph block matrix; determining the offset of the image block data corresponding to each image block according to the original point position of the routing graph in the head data; and generating the header file according to the header data and the offset of each image block data, and generating the data file according to the image block data so as to split the routing data into the header file and the data file.
In an exemplary embodiment of the present disclosure, determining an offset of tile data corresponding to each tile according to an origin position of a seek pattern in the header data includes: and determining the number of each image block according to the original point position of the routing graph in the head data, and sequentially determining the offset of each image block data according to a preset sequence, wherein the offset of the image block data is stored according to a row-column coding form.
In an exemplary embodiment of the present disclosure, determining the number of each tile according to the origin position of the seek pattern in the header data includes: and determining the position of each image block in the image block matrix according to the original point position of the routing graph in the head data, and determining the number of each image block according to the position of each image block in the image block matrix and the width of the image block matrix.
In an exemplary embodiment of the present disclosure, sequentially determining the offset of each of the block data according to a preset order includes: and taking the tile block data of the tile block corresponding to the current number as the offset of the tile block data corresponding to the next number.
In an exemplary embodiment of the present disclosure, determining a tile matrix composed of a preset number of tiles according to a position of a virtual character, and loading tile data corresponding to the tile matrix includes: determining the number of the image block where the position of the virtual role is located according to the position of the virtual role and the header data in the header file; determining the number of each image block in an image block matrix taking the image block in which the position of the virtual character is located as the center according to the number of the image block in which the position of the virtual character is located; and loading the tile block data corresponding to the number of each tile block in the tile block matrix through the offset of the tile block data in the header file.
In an exemplary embodiment of the present disclosure, the method further comprises: if the position of the virtual role is in a preset area in a tile block matrix, keeping the tile block matrix and the tile block data unchanged; if the position of the virtual role is outside the preset area, determining the image block matrix composed of the image blocks in the preset number again, and loading the image block data corresponding to the determined image block matrix.
In an exemplary embodiment of the present disclosure, the re-determining a tile matrix composed of a preset number of tiles, and loading tile data corresponding to the re-determined tile matrix includes: and comparing the re-determined image block matrix with the image block matrix, and loading image block data according to a comparison result.
In an exemplary embodiment of the present disclosure, loading the tile data according to the comparison result includes: determining a different tile of the re-determined tile matrix than the tile matrix; and loading the tile data of the tile only existing in the re-determined tile matrix in the different tiles, and deleting the tile data of the tile only existing in the tile matrix in the different tiles.
According to an aspect of the present disclosure, there is provided a way-finding data processing apparatus including: the data splitting module is used for splitting routing data into a header file and a data file, wherein the header file comprises the header data in the routing data and offsets of the image block data corresponding to a plurality of image blocks, and the data file comprises the image block data corresponding to the plurality of image blocks; and the data loading module is used for loading the header file, determining a pattern block matrix consisting of a preset number of pattern blocks according to the position of the virtual role, and loading pattern block data corresponding to the pattern block matrix.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the way-finding data processing methods described above via execution of the executable instructions.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the way-finding data processing method of any one of the above.
In the way finding data processing method, the way finding data processing device, the electronic device, and the computer readable storage medium provided in the exemplary embodiment of the present disclosure, on one hand, by splitting the way finding data into the header file and the data file, and loading the header data and the data of the tile matrixes including the preset number of tiles determined according to the positions of the virtual characters, since the header file occupies a smaller memory, the data of the preset number of tile matrixes also occupies a smaller memory, the problem of occupying a larger memory when loading the whole quantity is avoided, the memory consumption is reduced, and for the mobile phone game with limited memory resources, the system stability and the smoothness of the game application are improved. On the other hand, because only the image block data comprising the preset number of image blocks is loaded at one time, the loaded data volume is small, and therefore the loading efficiency of the way searching data can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 schematically illustrates a schematic diagram of a way-finding data processing method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a schematic diagram of a tile matrix in an exemplary embodiment of the disclosure;
FIG. 3 schematically illustrates a schematic diagram of determining a tile matrix in an exemplary embodiment of the disclosure;
FIG. 4 schematically illustrates a diagram of loading tile data in an exemplary embodiment of the disclosure;
FIG. 5 is a block diagram schematically illustrating a way-finding data processing apparatus in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of an electronic device in an exemplary embodiment of the disclosure;
fig. 7 schematically illustrates a program product in an exemplary embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The present exemplary embodiment first provides a way-finding data processing method, which can be applied to a terminal capable of presenting virtual characters and virtual map scenes. Next, a way-finding data processing method in the present exemplary embodiment is specifically described with reference to fig. 1.
In step S110, the way finding data is split into a header file and a data file, the header file includes the header data in the way finding data and an offset of tile data corresponding to a plurality of tiles, and the data file includes the tile data corresponding to a plurality of tiles.
In the exemplary embodiment, the way-finding data refers to all data of the way-finding graph that Recast abstracts the 3D world into the navigation grid. The routing data of the dtNavMesh can be obtained through a native routing map generator provided by Recast and Detour. The components of the way-finding data include: header data of the seek pattern, an offset of Tile data (Tile data) of a plurality of tiles, and Tile data corresponding to the plurality of tiles. The header data of the routing graph includes the number of the tiles and some self-defining parameters, and the self-defining parameters may be, for example, the origin position of the routing graph, the size of the Tile tiles, i.e., the width and height of each Tile, the number of the Tile tiles, and the width (W) and height (H) of the Tile matrix. The offset of the tile data may be referred to as a storage offset of the tile data, and is mainly used for recording an offset amount of each tile data. The Tile data is mainly used for recording specific routing data contained in each Tile.
In this exemplary embodiment, in order to reduce the memory occupied when loading data, the way-finding data may be split into a header file and a data file, or may be understood as storing the way-finding data in the header file and the data file, respectively. Specifically, generating the header file according to the header data and the offset of each tile data, and generating the data file according to the tile data may be understood as: the header data and the offset of each tile data in the way-finding graph are stored in one file to form a header file, and the tile data is stored in another file to form a data file, so that the way-finding data is divided into the header file and the data file.
After obtaining the origin position of the seek pattern, the Tile size, and the wide and high header data of the Tile matrix, the offset of each Tile data can be obtained from the header data. Namely, the number of each image block is determined according to the original point position of the routing graph in the head data, and the offset of each image block data is sequentially determined according to the preset sequence. The preset sequence may be, for example, a sequence of the numbers of the blocks from small to large, or a sequence of the numbers of the blocks from large to small, and the sequence of the numbers of the blocks from small to large is taken as an example in the present exemplary embodiment for description. The position (x, y) of each Tile in the Tile matrix is obtained by the origin position of the seek pattern in the header data provided by Tile, and the position here can be expressed as the row and column. Next, the number of each tile is calculated according to its position in the tile matrix and its width, which may be expressed as x + y × W, and may be stored in order from small to large. After the number of each tile is determined, the offset of the tile data of each tile is calculated in turn, starting with the tile numbered 0. Specifically, the tile data of the tile corresponding to the current number may be used as the offset of the tile data corresponding to the next number. For example, the data offset of each tile is recorded in an incremental manner, for example, the offset of the tile data corresponding to the tile numbered 0 is 0, the offset of the tile data corresponding to the tile numbered 1 is the data size of the tile numbered 0, the offset of the tile data corresponding to the tile numbered 2 is the data size of the tile numbered 1, and so on.
It should be noted that, in the present exemplary embodiment, the storage format of the offset of the tile data is modified, and a row-column encoding form is used, that is, the offset of each tile data is recorded in a key-value pair form. Specifically, the key value may be the position of the tile, i.e., the several columns in the several rows, and the value may be the offset of the tile data corresponding to the position of the tile. The offset of the block data is stored according to a row-column coding format, so that the block data of any row-column can be found in the data file according to the offset of the block data, and the block data can be quickly acquired.
On the basis, the routing data can be divided into header files by uniformly recording the header data, the number of the image blocks and the offset of the image block data into one file. For the block data, starting from the block numbered 0, the block data of each block is compressed in sequence, and the compressed data is stored in the data file corresponding to the way-finding graph in sequence to form a data file. After the way-finding data is divided into the header file and the data file, the header file can be directly stored in the memory so as to be conveniently and directly loaded from the memory subsequently.
In step S120, the header file is loaded, a tile block matrix composed of a preset number of tile blocks is determined according to the position of the virtual character, and tile block data corresponding to the tile block matrix is loaded.
In the exemplary embodiment, when the system is started, the header file stored in the memory is loaded first. Since the file resident in the memory only has a header file, and the header file is a very small file, when the way-finding data reaches 68MB, the size of the header file is only 162KB, so that the memory consumption is small when the header file is loaded.
For the image block data in the data file, the occupied memory consumption can be reduced in a dynamic loading mode. Specifically, a tile matrix including a preset number of tiles may be determined according to a position where the virtual character is located. A virtual character refers to a character currently controlled by a user in a game application. After determining the tile matrix, only the tile data corresponding to the tile matrix is loaded at a time, that is, only the tile data of the tiles included in the tile matrix is loaded, instead of loading the tile data of all the tiles in full. The tile matrix may be, for example, 201 in fig. 2, and the preset number of tiles constituting the tile matrix may be set according to actual requirements, for example, 25 tiles, 36 tiles, and so on, and the preset number of 25 tiles is taken as an example for description herein. The 25 tiles may be arranged in a 5 x 5 manner to form a 5 x 5 tile matrix, as shown in fig. 2. The size of each block can be the same, but the width and height of each block can be the same or different, i.e. each block can be square or rectangular.
The specific steps of determining the tile matrix composed of a preset number of tiles according to the position of the virtual character and loading the tile data corresponding to the tile matrix include steps S301 to S303 shown in fig. 3.
In step S301, the number of the tile where the position of the virtual character is located is determined according to the position of the virtual character and the header data in the header file.
In the step, the position of the virtual character may be any one of positions, which may be expressed by coordinates. Further, the coordinates (x, y) of the position where the virtual character is located may be obtained from the position of the virtual character, the origin position of the routing map stored in the header data, and the size of each tile in the header data. And then the number x + y W of the pattern block where the position of the virtual character is located can be obtained according to the coordinates and the width of the pattern block matrix.
In step S302, the number of each tile in the tile matrix centered on the tile in which the position of the virtual character is located is determined according to the number of the tile in which the position of the virtual character is located.
In this step, after obtaining the number of the tile block at the position of the virtual character, the number of the tile block that needs to be loaded in the tile block matrix including 25 tile blocks and centered on the tile block at the position of the virtual character can be obtained according to the number. For example, after determining the tile in which the virtual character is located, the tile may be started, and the tile may be moved up, down, left, and right by two grids to determine 25 tiles. And then, the position of each image block can be determined according to the original point position of the routing graph, namely, each image block is positioned in the row and column, and then the number of 25 image blocks to be loaded is obtained according to the position of each image block and the width of an image block matrix.
In step S303, the tile data corresponding to the number of each tile in the tile matrix is loaded through the offset of the tile data in the header file.
In this step, since the offsets of the tile data in the header file are stored in a row-column encoding manner and correspond to the tile data of the tile, the tile data of 25 tiles in the data file can be quickly loaded through the offsets of the tile data, and then the local routing graph including only the tile data of 25 tiles is generated.
When loading the data file, since the position of the virtual character is not fixed, if the position of the virtual character changes, the tile data may be loaded with reference to the steps shown in fig. 4. Wherein:
in step S401, if the position of the virtual character is within the preset area, the tile matrix and the tile data are kept unchanged.
In this step, the preset region refers to a region of any size in the tile matrix, for example, a 3 × 3 region concentric with the tile matrix, a 4 × 4 or 2 × 2 region, and so on, as long as the preset region is inside the tile matrix. The preset area may be used to represent a buffer, as long as the virtual character is within the buffer, there is no need to reload the tile. If the position of the virtual character changes, but the changed position B is still in the preset area 202, the tile block matrix determined according to the position a of the virtual character before the change may be kept unchanged, and the loaded data may not change.
In step S402, if the position of the virtual character is outside the preset region, the tile block matrix composed of a preset number of tile blocks is determined again, and the tile block data corresponding to the determined tile block matrix is loaded.
In this step, if the position C after the virtual role change is outside the preset region, that is, at another position in the tile matrix except the preset region, or at a position outside the tile matrix, it is necessary to re-determine the tile matrices composed of the preset number of tiles with the position after the virtual role change as a center, and load the tile data corresponding to the re-determined tile matrices. Specifically, with the position C after the virtual role is changed as a center, the number of each tile in the tile matrix composed of 25 tiles corresponding to the position C is redetermined, so that the tile data is loaded according to the redetermined tile number.
The specific steps of re-determining a tile matrix composed of a preset number of tiles, and loading tile data according to the re-determined tile matrix include: and comparing the re-determined image block matrix with the image block matrix, and loading image block data according to a comparison result. That is, the tile matrix of 25 tiles determined with the position C as the center is compared with the tile matrix of 25 tiles determined with the position a as the center to obtain the comparison result. The comparison result may be used to indicate which tiles are the same, which tiles are different, and so on.
The step of loading the image block data in a proper mode based on the comparison result comprises the following steps: determining a different tile of the re-determined tile matrix than the tile matrix; and loading the tile data of the tile only existing in the re-determined tile matrix in the different tiles, and deleting the tile data of the tile only existing in the tile matrix in the different tiles. For example, the newly determined 25 tiles are compared with the 25 tiles corresponding to the positions before the change, the tiles that are not currently loaded are loaded, one or more tiles that are currently loaded but not present in the new 25 tiles are deleted, and no processing is performed for the tiles present in both tile matrices. In the exemplary embodiment, by processing only the tile data of different tiles in the tile matrix corresponding to the position before the change, the data processing amount is reduced compared to the full load.
Referring to FIG. 2, the Tile matrix 201 is a 5 × 5 Tile grid, each representing a Tile. In the operating state, the system loads tile data corresponding to 25 tiles of 5 × 5 size centered around the position a of the virtual character. When the virtual character leaves the preset area 202, the system loads the tile block matrix 203 centering on the position C of the virtual character, calculates the number of 25 tile blocks to be loaded and the tile block data of each tile block, and deletes the tile block data of redundant tile blocks which are different from the tile block matrix 203 and only exist in the tile block matrix 201. At the same time as the tile matrix 203 is loaded, the predetermined area is also changed, for example, as shown at 204 in fig. 2.
By determining the pattern block matrix which takes the virtual character as the center and comprises the pattern blocks with the preset number, and only loading the pattern block data of the pattern blocks with the preset number at one time, the problem of large memory caused by the fact that the routing data are loaded in a full amount every time is solved, the loaded data volume is reduced, the memory consumption is also reduced, the smoothness of game application is improved, and the routing data loading efficiency is improved.
The disclosure also provides a way-finding data processing device. Referring to fig. 5, the way-finding data processing apparatus 500 may include:
a data splitting module 501, configured to split routing data into a header file and a data file, where the header file includes offsets of header data in the routing data and tile data corresponding to multiple tiles, and the data file includes tile data corresponding to multiple tiles;
the data loading module 502 may be configured to load the header file, determine a tile matrix composed of a preset number of tiles according to the position of the virtual role, and load tile data corresponding to the tile matrix.
It should be noted that the specific details of each module in the above-mentioned way-finding data processing apparatus have been described in detail in the corresponding way-finding data processing method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one memory unit 620, and a bus 630 that couples the various system components including the memory unit 620 and the processing unit 610.
Wherein the storage unit stores program code that is executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The display unit 640 may be a display having a display function to show a processing result obtained by the processing unit 610 performing the method in the present exemplary embodiment through the display. The display includes, but is not limited to, a liquid crystal display or other display.
The electronic device 600 may also communicate with one or more external devices 800 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. As shown, the network adapter 660 communicates with the other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 7, a program product 700 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (11)

1. A way-finding data processing method is characterized by comprising the following steps:
splitting routing data into a header file and a data file, wherein the header file comprises the header data in the routing data and offsets of the tile data corresponding to a plurality of tiles, and the data file comprises the tile data corresponding to the plurality of tiles;
loading the header file, determining a pattern block matrix composed of a preset number of pattern blocks according to the positions of the virtual roles, and loading pattern block data corresponding to the pattern block matrix
Wherein the splitting the way-finding data into the header file and the data file comprises:
acquiring head data in the way searching data, wherein the head data comprises an origin position of a way searching graph, a size of a graph block and a width of a graph block matrix;
determining the offset of the image block data corresponding to each image block according to the original point position of the routing graph in the head data;
and generating the header file according to the header data and the offset of each block data, and generating the data file according to the block data so as to split the routing data into the header file and the data file, wherein the offset of the block data refers to block data storage offset.
2. The way-finding data processing method according to claim 1, wherein determining the offset of the tile data corresponding to each tile according to the origin position of the way-finding graph in the header data comprises:
and determining the number of each image block according to the original point position of the routing graph in the head data, and sequentially determining the offset of each image block data according to a preset sequence, wherein the offset of the image block data is stored according to a row-column coding form.
3. The way-finding data processing method according to claim 2, wherein determining the number of each tile according to the position of the origin of the way-finding pattern in the header data comprises:
and determining the position of each image block in the image block matrix according to the original point position of the routing graph in the head data, and determining the number of each image block according to the position of each image block in the image block matrix and the width of the image block matrix.
4. The way-finding data processing method according to claim 2, wherein determining the offset of each of the tile data in turn according to a preset order comprises:
and taking the tile block data of the tile block corresponding to the current number as the offset of the tile block data corresponding to the next number.
5. The way-finding data processing method according to claim 1, wherein determining a tile matrix composed of a preset number of tiles according to the positions of the virtual roles, and loading the tile data corresponding to the tile matrix comprises:
determining the number of the image block where the position of the virtual role is located according to the position of the virtual role and the header data in the header file;
determining the number of each image block in an image block matrix taking the image block in which the position of the virtual character is located as the center according to the number of the image block in which the position of the virtual character is located;
and loading the tile block data corresponding to the number of each tile block in the tile block matrix through the offset of the tile block data in the header file.
6. The way-finding data processing method according to claim 5, characterized in that the method further comprises:
if the position of the virtual role is in a preset area in a tile block matrix, keeping the tile block matrix and the tile block data unchanged;
if the position of the virtual role is outside the preset area, determining the image block matrix composed of the image blocks in the preset number again, and loading the image block data corresponding to the determined image block matrix.
7. The way-finding data processing method according to claim 6, wherein re-determining a tile matrix composed of a preset number of tiles, and loading tile data corresponding to the re-determined tile matrix comprises:
and comparing the re-determined image block matrix with the image block matrix, and loading image block data according to a comparison result.
8. The way-finding data processing method according to claim 7, wherein loading tile data according to the comparison result comprises:
determining a different tile of the re-determined tile matrix than the tile matrix;
and loading the tile data of the tile only existing in the re-determined tile matrix in the different tiles, and deleting the tile data of the tile only existing in the tile matrix in the different tiles.
9. A way-finding data processing apparatus, comprising:
the data splitting module is used for splitting routing data into a header file and a data file, wherein the header file comprises the header data in the routing data and offsets of the image block data corresponding to a plurality of image blocks, and the data file comprises the image block data corresponding to the plurality of image blocks;
the data loading module is used for loading the header file, determining a pattern block matrix consisting of a preset number of pattern blocks according to the position of the virtual role, and loading pattern block data corresponding to the pattern block matrix;
wherein the data splitting module is configured to:
acquiring head data in the way searching data, wherein the head data comprises an origin position of a way searching graph, a size of a graph block and a width of a graph block matrix;
determining the offset of the image block data corresponding to each image block according to the original point position of the routing graph in the head data;
and generating the header file according to the header data and the offset of each block data, and generating the data file according to the block data so as to split the routing data into the header file and the data file, wherein the offset of the block data refers to block data storage offset.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the way-finding data processing method of any one of claims 1-8 via execution of the executable instructions.
11. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the way-finding data processing method according to any one of claims 1 to 8.
CN201811326617.7A 2018-11-08 2018-11-08 Path finding data processing method and device, electronic equipment and storage medium Active CN109446452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811326617.7A CN109446452B (en) 2018-11-08 2018-11-08 Path finding data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811326617.7A CN109446452B (en) 2018-11-08 2018-11-08 Path finding data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109446452A CN109446452A (en) 2019-03-08
CN109446452B true CN109446452B (en) 2021-07-13

Family

ID=65552432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811326617.7A Active CN109446452B (en) 2018-11-08 2018-11-08 Path finding data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109446452B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991713A (en) * 2017-04-13 2017-07-28 网易(杭州)网络有限公司 Method and apparatus, medium, processor and the terminal of scene in more new game
CN107908634B (en) * 2017-08-29 2022-02-22 深圳壹账通智能科技有限公司 Cache control method of browser and mobile terminal

Also Published As

Publication number Publication date
CN109446452A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
US11824926B2 (en) Efficient live-migration of remotely accessed data
US11340803B2 (en) Method for configuring resources, electronic device and computer program product
CN110609730B (en) Method and equipment for realizing interrupt transparent transmission between virtual processors
US20140053143A1 (en) Context-specific optimized code
CN110908609B (en) Method, system and equipment for processing disk and readable storage medium
CN104104705B (en) The cut-in method and equipment of distributed memory system
US11947842B2 (en) Method for writing data in append mode, device and storage medium
US11099761B2 (en) Method, device and computer program product for expanding storage space
CN111026493B (en) Interface rendering processing method and device
US11379138B2 (en) Method, device, and computer program product for managing access request in storage system
CN110413413A (en) A kind of method for writing data, device, equipment and storage medium
US10565000B2 (en) Method and apparatus for online upgrade of kernel-based virtual machine module
KR20160022362A (en) Synchronization points for state information
US10025607B2 (en) Optimizing a file system interface in a virtualized computing environment
US20210133918A1 (en) Method, electronic device and computer program product for expanding memory of gpu
CN109446452B (en) Path finding data processing method and device, electronic equipment and storage medium
CN113127430A (en) Mirror image information processing method and device, computer readable medium and electronic equipment
CN116360928A (en) Optimization method and device of android container display system and electronic equipment
CN106940626B (en) Method and system for acquiring difference data among multiple disks of virtual machine
US10579373B2 (en) Seamless extension porting
CN114692055A (en) Form processing method and device, storage medium and electronic equipment
CN103077069B (en) The method and device that instruction resolves
CN114765051A (en) Memory test method and device, readable storage medium and electronic equipment
US9836401B2 (en) Multi-core simulation system and method based on shared translation block cache
CN112506592A (en) Method, device, equipment and storage medium for determining page loading duration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant