Game resource access method and device, medium, electronic equipment and program product

Through the virtual file system, the game resource package and disk files are uniformly stored, which solves the problem of game resource access adaptation and read and write speed reduction of different system platforms, and realizes unified cross-platform access and efficient file management.

CN118987629APending Publication Date: 2024-11-22BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411189086.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The access rules for game resource on different system platforms are different, which leads to the need to adapt to different types of game engines. The mobile terminal stores too many game resource files, resulting in a decrease in the file reading and writing speed.

Method used

Through the virtual file system, the game engine can access the required files without directly accessing the resource package or disk, avoiding engine modification and increasing access speed.

Benefits of technology

It realizes the unification of cross-platform game resource access, reduces game development costs, and improves the access speed of resource files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118987629A_ABST
    Figure CN118987629A_ABST
Patent Text Reader

Abstract

The invention relates to a game resource access method and device, a medium, electronic equipment and a program product, and belongs to the technical field of computers. The method comprises the steps that game resource files in a game resource package and game resource files in a disk are stored in a virtual file system through a preset storage file, and then a resource access request sent by a game engine is obtained; and determining the target resource file corresponding to the resource access request in the virtual file system, and executing the target operation on the target resource file, so that the game engine can access the required game resource file under the condition of not directly accessing a game resource package or a disk, thereby avoiding modifying the game engine, and improving the efficiency of the game engine. And the access speed of the game resource file can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a method, device, medium, electronic device and program product for accessing game resources. Background Art

[0002] At present, games are generally oriented to platforms of different systems, such as PC (personal computer), Android (Android), IOS (Apple operating system) and other system platforms. However, due to the different game resource access rules of different systems, it is necessary to adapt different types of game engines. For example, the game resource package in IOS can be accessed by the game engine, while the game resource package in Android cannot be accessed by the game engine. In addition, storing too many game resource files on the disk of the mobile terminal will also cause a significant decrease in the reading and writing speed of the files. Therefore, how to solve the access to game resource files has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a method for accessing game resources, comprising: Obtaining a resource access request sent by the game engine for instructing to perform a target operation on a target resource file; In response to the resource access request, a target resource file corresponding to the resource access request is determined in a virtual file system, and the target operation is performed on the target resource file, wherein the virtual file system is used to store game resource files in a game resource package and game resource files in a disk through a preset storage file.

[0005] In a second aspect, the present disclosure provides a game resource access device, comprising: An acquisition module is configured to acquire a resource access request sent by a game engine for instructing to perform a target operation on a target resource file; An execution module is configured to determine, in response to the resource access request, a target resource file corresponding to the resource access request in a virtual file system, and perform the target operation on the target resource file, wherein the virtual file system is used to store game resource files in a game resource package and game resource files in a disk through a preset storage file.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] Based on the above technical solution, by obtaining a resource access request sent by a game engine to indicate the execution of a target operation on a target resource file, and responding to the resource access request, the target resource file corresponding to the resource access request is determined in the virtual file system, and the target operation is executed on the target resource file. Moreover, the virtual file system stores the game resource files in the game resource package and the game resource files in the disk through a preset storage file, and the game resource files in the game resource package and the game resource files in the disk can be uniformly stored in the virtual file system, so that the game engine can access the required game resource files without directly accessing the game resource package or the disk, thereby avoiding the modification of the game engine itself, and also improving the access speed of the game resource files. Moreover, by uniformly storing the game resource files of the game resource package and the game resource files of the disk through the virtual file system, game developers do not need to judge whether the game resource files are stored in the game resource package or the disk when designing the game resource files, which greatly reduces the research and development costs.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flowchart of a method for accessing game resources according to some embodiments.

[0012] Figure 2 is a schematic diagram of a virtual file system according to some embodiments.

[0013] Figure 3is a schematic diagram of a unified file access interface according to some embodiments.

[0014] Figure 4 It is a schematic diagram showing the principles of a virtual file system according to some embodiments.

[0015] Figure 5 It is a schematic diagram showing the principles of a method for accessing game resources according to some embodiments.

[0016] Figure 6 is a schematic diagram of updating game resource files according to some embodiments.

[0017] Figure 7 It is a structural diagram of a device for accessing game resources according to an exemplary embodiment.

[0018] Figure 8 It is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0020] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0021] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0022] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0023] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0025] Figure 1 FIG. 1 is a flowchart of a method for accessing game resources according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides a method for accessing game resources, which can be executed by an electronic device, specifically, by a game resource access device, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.

[0026] In step 110, a resource access request sent by a game engine and used to instruct execution of a target operation on a target resource file is obtained.

[0027] Here, the target operation performed on the target resource file may be reading the target resource file or updating the target resource file. Of course, the target operation may also include other operations, such as deleting a game resource file, querying a game resource file, etc. When the game engine needs to read a game resource file or update a game resource file, the game engine may trigger a resource access request.

[0028] In step 120, in response to a resource access request, a target resource file corresponding to the resource access request is determined in the virtual file system, and a target operation is performed on the target resource file, wherein the virtual file system is used to store game resource files in a game resource package and game resource files in a disk through a preset storage file.

[0029] Here, the game resource files may include images, audio, and animations that need to be loaded during the game running process, etc. The Virtual File System (VFS) is used to store the game resource files in the game resource package and the game resource files in the disk through a preset storage file.

[0030] That is to say, the game resource files in the game resource package and the game resource files in the disk are uniformly stored in the virtual file system, and the virtual file system provides a universal interface to the external game engine so that the game engine can access the corresponding game resource files through the universal interface provided by the virtual file system.

[0031] It should be understood that the virtual file system actually abstracts the game resource package and the disk into a unified file system. When the game engine accesses the game resource file in the game resource package or the disk, it can directly access the corresponding game resource file in the virtual file system without accessing the game resource file from the game resource package or the disk, thereby avoiding the situation where the game engine needs to be modified because the system does not support access to the game resource package, and also avoiding the situation where the reading speed is slow due to directly reading the file in the disk.

[0032] It is worth noting that the number of preset storage files can be one or more. When the file size of the game resource files in the game resource package and the game resource files on the disk is too large, multiple preset storage files can be used to store the game resource files in the game resource package and the game resource files on the disk.

[0033] After receiving the resource access request sent by the game engine, the target resource file indicated by the resource access request is searched in the virtual file system, and the target operation is performed on the target resource file.

[0034] Exemplarily, when the target operation is a read operation, the target resource file is returned to the game engine. When the target operation is an update operation, the target resource file is updated.

[0035] Thus, by obtaining a resource access request sent by the game engine for indicating the execution of a target operation on a target resource file, and responding to the resource access request, the target resource file corresponding to the resource access request is determined in the virtual file system, and the target operation is executed on the target resource file, and the virtual file system stores the game resource files in the game resource package and the game resource files in the disk through a preset storage file, and the game resource files in the game resource package and the game resource files in the disk can be uniformly stored in the virtual file system, so that the game engine can access the required game resource files without directly accessing the game resource package or the disk, thereby avoiding the modification of the game engine itself, and also improving the access speed of the game resource files. Moreover, by uniformly storing the game resource files of the game resource package and the game resource files of the disk through the virtual file system, when designing the game resource files, the game developers do not need to judge whether the game resource files are stored in the game resource package or the disk, which greatly reduces the research and development costs.

[0036] In some feasible implementations, the preset storage file includes a resource storage file and a corresponding index file, the resource storage file is used to store the original game resource file, and the index file is used to store metadata corresponding to each game resource file in the resource storage file.

[0037] Here, each preset storage file includes a resource storage file (Data file) and an index file (Table file) corresponding to the resource storage file.

[0038] In the resource storage file, the game resource files from the game resource pack and the disk can be stored in the form of queues. The index file can also store the metadata corresponding to each game resource file in the resource storage file in the form of queues.

[0039] The metadata corresponding to the game resource file may include the resource offset information of the game resource file in the resource storage file and the resource description information of the game resource file. The resource offset information is used to indicate the storage location of a certain game resource culture in the resource storage file, and the resource description information may include information such as file size.

[0040] By using the metadata corresponding to the game resource file stored in the index file, the game resource file corresponding to the metadata can be indexed in the resource storage file. In other words, the metadata corresponding to the game resource file can be understood as a pointer, which points to the game resource file in the resource storage file.

[0041] Exemplarily, when the resource access request is to read the target resource file in the virtual file system, the target metadata corresponding to the target resource file is determined in the index file, and then the target resource file pointed to by the target metadata is determined in the resource storage file through the target metadata, and the determined target resource file is returned to the game engine.

[0042] Figure 2 FIG. 1 is a schematic diagram of a virtual file system according to some embodiments. Figure 2 As shown, the virtual file system includes an index file and a resource storage file. The resource storage file stores game resource file A and game resource file B, and the index file stores metadata of game resource file A and metadata of game resource file B. The metadata of game resource file A points to game resource file A, and the metadata of game resource file B points to game resource file B. Of course, the resource storage file may also include a tamper-proof data group, and the index file may also include a tamper-proof resource header. It should be noted that the tamper-proof data group and the tamper-proof resource header are used to prevent the resource storage file and the index file from being modified by unauthorized operations. In actual application scenarios, the tamper-proof data group and the tamper-proof resource header can be set according to actual conditions.

[0043] It is worth noting that in the virtual file system, at least one preset storage file can be used to store the game resource files in the game resource package and the game resource files in the disk. In other words, a set of resource storage files and index files can be used to store all the game resource files in the game resource package and the game resource files in the disk, so that the number of files in the virtual file system is controllable, and the read and write performance of the file will not change as the file size increases.

[0044] Therefore, by storing the game resource files in the game resource package and the game resource files on the disk through resource storage files and index files, the virtual file system can be used to store the game resource files in the game resource package and the game resource files on the disk through a very small number of files. Ideally, the game resource files in the game resource package and the game resource files on the disk can be stored through both resource storage files and index files, so that there will not be a large number of hash files in the virtual file system, thereby avoiding the problem of reduced resource reading and writing performance in a certain directory.

[0045] In some feasible implementations, the game resource files in the game resource package and the game resource files in the disk can be read through a unified file access interface, and the game resource files in the game resource package and the game resource files in the disk can be stored through a preset storage file to obtain a virtual file system.

[0046] Here, the unified file access interface supports access to game resource packages and disks in different types of operating systems. The operating system may refer to the operating system on which the game runs, such as Android, IOS, Windows, and other operating systems.

[0047] Exemplarily, the unified file access interface is used to encapsulate a resource pack access interface and a disk access interface. The resource pack access interface is used to call an interface adapted to the type of operating system to access the game resource pack. The disk access interface is used to call an interface adapted to the type of operating system to access the disk.

[0048] Figure 3 FIG. 1 is a schematic diagram of a unified file access interface according to some embodiments. Figure 3 As shown in the figure, the unified file access interface encapsulates the resource package access interface and the disk access interface. The unified file access interface provides the capabilities of Read, Write, Open, Close, ReadOffset, and WriteOffset.

[0049] The resource package access interface can be encapsulated with a JNI interface and a C++ interface. The JNI interface is used to read resource files in the game resource package in the Android system, and the C++ interface reads game resource files in the game resource package in the IOS and Windows systems. The disk access interface can be encapsulated with a C++ interface, which reads game resource files in the disk in the Android, IOS, and Windows systems.

[0050] When the unified file access interface is called, the unified file access interface calls the resource package access interface and / or the disk access interface. The resource package access interface and / or the disk access interface then calls an interface adapted to the system type to access the inside of the game resource package and / or the disk.

[0051] For example, when the unified file access interface is called to read the game resource files of the game resource package in the Android operating system, the unified file access interface calls the resource package access interface, and the resource package access interface calls the JNI interface to read the game resource files in the game resource package.

[0052] It should be noted that the resource bundle access interface can be read-only, while the disk access interface can be read-write.

[0053] It is worth noting that by encapsulating the resource package access interface and the disk access interface through the unified file access interface, the unified file access interface can access game resource packages and disks of different types of operating systems, thereby unifying the operation details of the game resource files and providing support for the virtual file system.

[0054] The game resource file in the game resource package and the disk is read through the unified file access interface, and then the game resource file read from the game resource package and the game resource file read from the disk are combined and stored through a preset storage file including a resource storage file and an index file. It should be understood that the game resource file read from the game resource package and the game resource file read from the disk can be stored in the resource storage file.

[0055] Therefore, through the unified file access interface, the game resource files inside the game resource packages of different types of operating systems and the game resource files on the disk can be read, thereby constructing the above-mentioned virtual file system in different types of operating systems.

[0056] In some feasible implementations, in step 110, the resource access request sent by the game engine can be obtained through a universal interface provided by the virtual file system, wherein the universal interface is used to support different types of game engines to access the virtual file system.

[0057] Here, the virtual file system provides a universal interface to the outside world, and the universal interface can support different types of game engines to access the virtual file system through the universal interface. Among them, different types of game engines may include Unity game engine, UE game engine, etc. Unity game engine is a real-time 3D interactive content creation and operation platform, and UE game engine is a game engine developed by Epic Games.

[0058] The general interface may include a query interface that provides a game resource file query function, an update interface that provides a game resource file update function, a read interface that provides a game resource file read function, a delete interface that provides a game resource file delete function, and the like.

[0059] The virtual file system obtains resource access requests triggered by the game engine through a universal interface provided to the outside, so that different types of game engines can access game resource files in the virtual file system.

[0060] Therefore, the virtual file system can adapt to any type of game engine by providing a universal interface that can support different types of game engines to access the virtual file system, thereby supporting different types of game engines without modifying the game engine or the virtual file system.

[0061] Figure 4 FIG. 1 is a schematic diagram showing the principle of a virtual file system according to some embodiments. Figure 4 As shown, the game resource files in the game resource packages in different types of operating systems and the game resource files in the disk are read through a unified file access interface encapsulating the resource package access interface and the disk access interface, and the game resource files in the game resource package and the game resource files in the disk are stored through the preset storage files in the virtual file system. The virtual file system provides a general interface that supports different types of game engines to access the virtual file system. The Unity game engine, UE game engine and other types of game engines access the virtual file system through the general interface provided by the virtual file system.

[0062] Figure 5 FIG. 1 is a schematic diagram showing a method for accessing game resources according to some embodiments. Figure 5 As shown, the game resource files stored in the game resource package through the first virtual file system and the game resource files stored in the disk through the second virtual file system are uniformly stored in the third virtual file system. The third virtual file system provides a universal interface to the upper layer so that different types of game engines can directly access the third virtual file system through the universal interface.

[0063] It is worth noting that in Figure 5In the game resource package, the game resource files in the disk can also be stored through index files and resource storage files. Figure 5 What is shown is only an example of storing game resource files in a game resource package and a disk. Game resource files may also be stored in the game resource package and the disk in other ways, for example, in the form of a file directory.

[0064] Through the game resource access method provided by the embodiment of the present disclosure, the game resource package and the game resource files in the disk are uniformly stored in the virtual file system, and the virtual file system provides a universal interface that can support different types of game engines to access the virtual file system. The game resource access method provided by the embodiment of the present disclosure can support all types of game engines to access game resource files without improving the game engine or the virtual file system, and adapt to any type of game engine, thereby facilitating rapid access to multiple game engines.

[0065] In some practicable implementations, the resource access request may be used to instruct to update the first game resource file in the virtual file system to the second game resource file. In other words, the target operation performed on the target resource file is to update the first game resource file to the second game resource file.

[0066] Accordingly, in step 120, in response to the resource access request, the first game resource file is determined and deleted in the resource storage file based on the metadata of the first game resource file in the index file, and then the second game resource file is stored at the end of the file of the resource storage file, and the metadata of the first game resource file in the index file is updated to the metadata of the second game resource file.

[0067] Here, in response to the resource access request, the metadata of the first game resource file is determined in the index file according to the first game resource file, and then the first game resource file is indexed in the resource storage file through the metadata of the first game resource file, and the first game resource file is deleted from the resource storage file. Then, the second game resource file is stored at the end of the resource storage file, and the metadata of the first game resource file in the index file is updated to the metadata of the second game resource file.

[0068] It should be noted that updating the metadata of the first game resource file in the index file to the metadata of the second game resource file is actually updating the resource offset information of the first game resource file in the index file to the resource offset information of the second game resource file in the resource storage file, and updating the resource description information of the first game resource file to the resource description information of the second game resource file, so that the updated metadata can execute the second game resource file in the resource storage file.

[0069] It is worth noting that deleting the first game resource file from the resource storage file is actually deleting the first game resource file from the storage space corresponding to the resource storage file. The deleted storage space can be used to store other game resource files whose file size is equal to or smaller than the file size of the first game resource file.

[0070] like Figure 2 As shown, the resource storage file stores game resource files in the form of a queue. Accordingly, storing the second game resource file at the end of the resource storage file can be understood as storing the second game resource file at the end of the queue.

[0071] Figure 6 FIG. 1 is a schematic diagram of updating a game resource file according to some embodiments. Figure 6 As shown, when the game resource file A is updated, the game resource file A can be deleted in the resource storage file, the updated game resource file A can be written at the end of the resource storage file, and the metadata of the game resource file A in the index file can be updated to the metadata of the updated game resource file A in the resource storage file, so that the metadata in the index file can point to the updated game resource file A.

[0072] In a virtual file system with multiple game resource files, by appending updated game resource files to the end of a file queue of a resource storage file, resource offset information of other game resource files stored in the resource storage file may not be changed, thereby increasing the resource update speed.

[0073] Therefore, by updating the game resource files through the above implementation method, the game resource files can be updated quickly without occupying too many computing resources, and the number of files in the virtual file system is controllable, so that the virtual file system will not be affected by the increase in the number of files. File read and write performance.

[0074] Figure 7 FIG. 1 is a schematic diagram showing the structure of a device for accessing game resources according to an exemplary embodiment. Figure 7 As shown, the embodiment of the present disclosure provides a game resource access device 700, and the game resource access device 700 includes: The acquisition module 701 is configured to acquire a resource access request sent by the game engine for instructing to perform a target operation on a target resource file; The execution module 702 is configured to determine the target resource file corresponding to the resource access request in the virtual file system in response to the resource access request, and perform the target operation on the target resource file, wherein the virtual file system is used to store the game resource files in the game resource package and the game resource files in the disk through a preset storage file.

[0075] Optionally, the game resource access device 700 may further include: A reading module is configured to read the game resource files in the game resource package and the game resource files in the disk through a unified file access interface, wherein the unified file access interface supports access to the game resource packages and disks in different types of operating systems; The obtaining module is configured to obtain the virtual file system by storing the game resource files in the game resource package and the game resource files in the disk through the preset storage file.

[0076] Optionally, the unified file access interface is used to encapsulate a resource package access interface and a disk access interface, the resource package access interface is used to call an interface adapted to the type of operating system to access the game resource package, and the disk access interface is used to call an interface adapted to the type of operating system to access the disk.

[0077] Optionally, the acquisition module 701 is specifically configured to: The resource access request sent by the game engine is obtained through a universal interface provided by the virtual file system, wherein the universal interface is used to support different types of game engines to access the virtual file system.

[0078] Optionally, the preset storage file includes a resource storage file and a corresponding index file, the resource storage file is used to store original game resource files, and the index file is used to store metadata corresponding to each of the game resource files in the resource storage file.

[0079] Optionally, the resource access request is used to instruct to update the first game resource file in the virtual file system to a second game resource file; The execution module 702 is specifically configured as follows: In response to the resource access request, determining and deleting the first game resource file in the resource storage file according to the metadata of the first game resource file in the index file; The second game resource file is stored at the end of the resource storage file, and the metadata of the first game resource file in the index file is updated to the metadata of the second game resource file.

[0080] The logic of the method executed by each functional module in the above-mentioned game resource access device 700 can refer to the part of the method related to the above-mentioned embodiment, and will not be repeated here.

[0081] Reference below Figure 8 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 800 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0082] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0083] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0084] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0085] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0086] In some embodiments, the electronic devices may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0087] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0088] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a resource access request sent by the game engine to indicate the execution of a target operation on a target resource file; in response to the resource access request, determines the target resource file corresponding to the resource access request in the virtual file system, and executes the target operation on the target resource file, wherein the virtual file system is used to store the game resource files in the game resource package and the game resource files in the disk through a preset storage file.

[0089] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0091] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, constitute a limitation on the module itself.

[0092] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0093] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0094] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0095] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0096] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for accessing game resources, characterized in that: include: Obtaining a resource access request sent by the game engine for instructing to perform a target operation on a target resource file; In response to the resource access request, a target resource file corresponding to the resource access request is determined in a virtual file system, and the target operation is performed on the target resource file, wherein the virtual file system is used to store game resource files in a game resource package and game resource files in a disk through a preset storage file.

2. The method according to claim 1, characterized in that The virtual file system is obtained by the following steps: Read the game resource files in the game resource package and the game resource files in the disk through a unified file access interface, wherein the unified file access interface supports accessing the game resource packages and disks in different types of operating systems; The game resource files in the game resource package and the game resource files in the disk are stored through the preset storage file to obtain the virtual file system.

3. The method according to claim 2, characterized in that The unified file access interface is used to encapsulate a resource package access interface and a disk access interface. The resource package access interface is used to call an interface adapted to the type of operating system to access the game resource package. The disk access interface is used to call an interface adapted to the type of operating system to access the disk.

4. The method according to any one of claims 1 to 3, characterized in that The step of obtaining a resource access request sent by the game engine and used to instruct execution of a target operation on a target resource file includes: The resource access request sent by the game engine is obtained through a universal interface provided by the virtual file system, wherein the universal interface is used to support different types of game engines to access the virtual file system.

5. The method according to any one of claims 1 to 4, characterized in that The preset storage file includes a resource storage file and a corresponding index file. The resource storage file is used to store the original game resource file, and the index file is used to store metadata corresponding to each of the game resource files in the resource storage file.

6. The method according to claim 5, characterized in that The resource access request is used to instruct to update the first game resource file in the virtual file system to the second game resource file; The step of determining, in response to the resource access request, a target resource file corresponding to the resource access request in the virtual file system, and performing the target operation on the target resource file comprises: In response to the resource access request, determining and deleting the first game resource file in the resource storage file according to the metadata of the first game resource file in the index file; The second game resource file is stored at the end of the resource storage file, and the metadata of the first game resource file in the index file is updated to the metadata of the second game resource file.

7. A game resource access device, characterized in that: include: An acquisition module is configured to acquire a resource access request sent by a game engine for instructing to perform a target operation on a target resource file; An execution module is configured to determine, in response to the resource access request, a target resource file corresponding to the resource access request in a virtual file system, and perform the target operation on the target resource file, wherein the virtual file system is used to store game resource files in a game resource package and game resource files in a disk through a preset storage file.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 6 are implemented.

9. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.