CN113384872A - Method and device for processing information resource in micro-terminal, electronic equipment and storage medium - Google Patents

Method and device for processing information resource in micro-terminal, electronic equipment and storage medium Download PDF

Info

Publication number
CN113384872A
CN113384872A CN202110519097.7A CN202110519097A CN113384872A CN 113384872 A CN113384872 A CN 113384872A CN 202110519097 A CN202110519097 A CN 202110519097A CN 113384872 A CN113384872 A CN 113384872A
Authority
CN
China
Prior art keywords
file
resolution
resource
micro
resolution resource
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.)
Pending
Application number
CN202110519097.7A
Other languages
Chinese (zh)
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 CN202110519097.7A priority Critical patent/CN113384872A/en
Publication of CN113384872A publication Critical patent/CN113384872A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/552Details of game data or player data management for downloading to client devices, e.g. using OS version, hardware or software profile of the client device

Abstract

The present disclosure relates to a method for processing information resources in a micro-terminal, comprising: receiving a resource request from a game client, wherein an initial version of a game is a low resolution version, whose low resolution resources are stored in the game client, and whose high resolution resources are stored in a micro-client database or server and contain one or more high resolution resource files; responding to the resource request, and detecting whether a requested high-resolution resource file exists in a memory resource pool, wherein the memory resource pool is shared by the game client and the micro-terminal: if the high-resolution resource file does not exist, writing the high-resolution resource file into a memory resource pool; and if so, returning the information of the high-resolution resource file to the game client so that the game client can load the high-resolution resource file. The present disclosure provides an improved method of resource handling that allows players to split the storage of high definition resources and low definition resources of a game and seamlessly switch the game between low definition and high definition versions.

Description

Method and device for processing information resource in micro-terminal, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method, an electronic device, and a storage medium for processing information resources in a micro-peer.
Background
With the progress of technology, the requirements of people on the quality of games are higher and higher, which requires richer game contents and finer game pictures, however, the game capacity is continuously increased as a result. The capacity of large games on the market today generally exceeds 10GB, and even some have broken through 100 GB. The continued expansion of game capacity is a necessary trend, which places high demands on the player's hard disk space. On one hand, the larger game capacity not only occupies more hard disk resources, but also causes the downloading and updating to be slower, and is likely to cause the loss of players due to the overlong waiting time of the downloading and updating process. On the other hand, certain high quality games may result in a player's low profile device running stuck, which may affect the gaming experience.
In this regard, the capacity size and download update experience are generally inversely related: the larger the capacity, the worse the download update experience and vice versa. While the volume size and the quality of the game are generally positively correlated: the larger the body, the higher the game quality and vice versa.
Therefore, how to balance the relationship among the size of the bag body, the downloading and updating experience and the game quality becomes a technical problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The applicant finds that the following disadvantages exist in the scheme in the related art in the long-term development process: at present, many games are divided into high definition versions and low definition versions, the low definition version inclusion is small, downloading experience of a player is optimized, the player can experience the games quickly, and meanwhile, the player is friendly to the player with a small hard disk space or a low configuration. The upgrade from low definition to high definition version is accomplished by downloading the full package of high definition version or downloading additional high definition package, and the game must be closed and the experience can be experienced only after the download of all high definition packages is completed. However, the high definition pack must be installed in the same directory of the initial version of the game (e.g., the low definition version that can be run independently), and the high definition pack and the low definition pack cannot be separately stored, which results in a high requirement for disk space. Moreover, channels that switch between low definition and high definition versions are missing, resulting in players that cannot seamlessly switch between performance and image quality.
In view of the above, the present disclosure provides a method, an apparatus, an electronic device, and a storage medium for processing information resources in a micro-peer.
According to an aspect of the present disclosure, there is provided a method of processing an information resource in a micro-peer, the method including: receiving a resource request from a game client, wherein an initial version of a game run by the game client is a low resolution version, a low resolution resource of the low resolution version is stored in the game client, and a high resolution resource of the game is stored in a micro-terminal database or a micro-terminal server, the high resolution resource containing one or more high resolution resource files; responding to the resource request, and detecting whether a high-resolution resource file for the resource request exists in a memory resource pool, wherein the memory resource pool is used by one or more game clients and the micro-client: if the high-resolution resource file does not exist, writing the high-resolution resource file stored in the micro-terminal database or the micro-terminal server into a memory resource pool; and if the high-resolution resource file exists, returning the information of the high-resolution resource file to a game client so that the game client can load the high-resolution resource file from the memory resource pool.
In an exemplary embodiment of the present disclosure, the method further comprises: receiving a release request from a game client; and responding to the release request, clearing the high-resolution resource in the memory resource pool, and enabling the game client to only load the low-resolution resource.
In an exemplary embodiment of the present disclosure, the method further comprises: and if the fact that the high-resolution resource file aimed at by the resource request does not exist in the micro-terminal database or the high-resolution resource file needs to be updated is detected, downloading the high-resolution resource file from a micro-terminal server to write the high-resolution resource file into the memory resource pool and store the high-resolution resource file in the micro-terminal database.
In an exemplary embodiment of the present disclosure, the method further comprises: and cleaning the high-resolution resources of which the unused time length reaches a threshold value in the micro-terminal database.
In an exemplary embodiment of the present disclosure, receiving a resource request from a game client includes: reading a request list, wherein the request list is written by the game client with resource requests for a high resolution resource file.
In an exemplary embodiment of the present disclosure, the memory resource pool is configured in units of pages, where writing the high resolution resource file into the memory resource pool includes: and configuring index information of the high-resolution resource file on the first page of the memory resource pool, and configuring file contents of the high-resolution resource file on the residual space of the first page and subsequent pages of the memory resource pool.
In an exemplary embodiment of the present disclosure, the index information includes a unique identification number UID of the high-resolution resource file, a file content size, and a file content location.
In an exemplary embodiment of the disclosure, the file content of the high-resolution resource file is divided into one or more chunks, wherein the file content location in the index information indicates a page number, an offset, a length corresponding to each chunk.
In an exemplary embodiment of the disclosure, returning information of the high resolution resource file to the game client comprises: and writing the index information of the high-resolution resource file into a reply list according to the sequence number, wherein the reply list is read by the game client.
In an exemplary embodiment of the disclosure, clearing the high resolution resource in the memory resource pool in response to the release request comprises: setting and incrementing a reference count corresponding to the high resolution resource in response to the resource request; reading a release list, decrementing the reference count, wherein the release list is written to by the game client with the release request; clearing the high resolution resource in the memory resource pool in response to the reference count being equal to 0.
In an exemplary embodiment of the present disclosure, clearing the high resolution resource in the memory resource pool in response to the release request comprises: reading a release list, wherein the release list is written with the release request by the game client; and clearing the high-resolution resource file aiming at the release request in the memory resource pool.
In an exemplary embodiment of the present disclosure, the high resolution resource files are stored in the micro-end server in the form of an external index file and an external packaged file, wherein the external index file comprises names of one or more high resolution resource files and a file entry sequence, the file entry sequence comprises UID and MD5 values of the high resolution resource files, and the external packaged file comprises one or more file contents.
In an exemplary embodiment of the present disclosure, the high resolution resource file is stored in the micro-peer database in the form of a local index file and a local packaged file, wherein the local index file includes a packaged file index table and mapping information of the UID to the local packaged file, the packaged file index table includes UID and MD5 values of the high resolution resource file, and the local packaged file includes a packaged file index table address and one or more file contents.
In an exemplary embodiment of the present disclosure, detecting whether the high resolution resource file for which the resource request is directed exists in the micro-peer database includes: detecting whether a local index file in the micro-terminal database contains the UID of the high-resolution resource file aimed at by the resource request.
In an exemplary embodiment of the present disclosure, detecting whether the high resolution resource file in the micro-peer database needs to be updated includes: and comparing the MD5 value of the high-resolution resource file in the micro-terminal database with the MD5 value of the high-resolution resource file in the micro-terminal server, and if the values are not the same, judging that the update is needed.
In an exemplary embodiment of the present disclosure, storing a high resolution resource file in the micro-tip database comprises: mapping information from the UID to a local packaging file is configured in the local index file according to the UID of the high-resolution resource file, wherein the mapping information from the UID to the local packaging file indicates the local packaging file corresponding to the UID and a packaging file index table address in the local packaging file; and storing the file content of the high-resolution resource file at the corresponding position of the local packaged file according to the address of the index table of the packaged file.
In an exemplary embodiment of the present disclosure, the clearing the high resolution resource whose unused duration reaches the threshold in the micro-end database comprises: checking the unused time length of each high-resolution resource file in the micro-terminal database, and if the unused time length exceeds the threshold value, deleting the corresponding high-resolution resource file, wherein the corresponding position of the deleted high-resolution resource file in the local packaging file in the micro-terminal database forms an idle space; and filling up the free space by the file below the free space, so as to reduce the size of the local packaging file.
In an exemplary embodiment of the present disclosure, the micro-client operates independently from the game client.
In an exemplary embodiment of the present disclosure, the micro-client supports parallel execution with a plurality of game clients.
In an exemplary embodiment of the present disclosure, the micro-tip database is stored in a different location than the low resolution version of the game.
According to an aspect of the present disclosure, there is provided an apparatus for processing an information resource in a micro-peer, the apparatus including: a receiving module, configured to receive a resource request from a game client, where an initial version of a game run by the game client is a low-resolution version, a low-resolution resource of the low-resolution version is stored in the game client, and a high-resolution resource of the game is stored in a micro-end database or a micro-end server, and the high-resolution resource includes one or more high-resolution resource files; the detection module is used for responding to the resource request and detecting whether a high-resolution resource file aimed at by the resource request exists in a memory resource pool, wherein the memory resource pool is used by one or more game clients and the micro-client; a writing module, configured to write the high-resolution resource file stored in the micro-end database or the micro-end server into the memory resource pool if the high-resolution resource file does not exist in the memory resource pool; and the return module is used for returning the information of the high-resolution resource file to a game client if the high-resolution resource file exists in the memory resource pool so that the game client can load the high-resolution resource file from the memory resource pool.
In an exemplary embodiment of the present disclosure, the apparatus further includes: the receiving module is also used for receiving a release request from the game client; and the clearing module is used for responding to the release request, clearing the high-resolution resource in the memory resource pool and enabling the game client to only load the low-resolution resource, wherein the receiving module is also used for receiving the release request from the game client.
In an exemplary embodiment of the present disclosure, the apparatus further includes: and the downloading module is used for downloading the high-resolution resource file from a micro-terminal server to be written into the memory resource pool and stored in the micro-terminal database if the high-resolution resource file aimed at by the resource request does not exist in the micro-terminal database or the high-resolution resource file needs to be updated.
In an exemplary embodiment of the present disclosure, the apparatus further includes: and the cleaning module is used for cleaning the high-resolution resources of which the unused time length reaches a threshold value in the micro-terminal database.
According to another aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform the method of processing information resources in a micro-peer of any of the above via execution of executable instructions.
According to another 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 method of processing information resources in a micro-peer of any of the above.
In at least one embodiment of the present disclosure, a method for processing information resources in a micro-peer is disclosed, by receiving a resource request from a game client, wherein an initial version of a game run by the game client is a low resolution version and a low resolution resource of the low resolution version is stored in the game client, and a high resolution resource of the game is stored in a micro-peer database or a micro-peer server, the high resolution resource containing one or more high resolution resource files; responding to the resource request, detecting whether a high-resolution resource file aimed by the resource request exists in a memory resource pool, wherein the memory resource pool is used by one or more game clients and the micro-client together: if the resource does not exist, writing the high-resolution resource file stored in the micro-terminal database or the micro-terminal server into the memory resource pool; if the high-resolution resource file exists, the information of the high-resolution resource file is returned to the game client so that the game client can load the high-resolution resource file from the memory resource pool, and therefore at least part of defects related to the prior art are solved.
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 included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 schematically illustrates a flowchart of a method of processing information resources in a micro-peer in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a further method of processing information resources in a micro-peer in an exemplary embodiment of the present disclosure;
FIG. 3 is a block diagram of a micro-client communicating with a game client according to an exemplary embodiment of the present disclosure;
fig. 4 is a diagram of a memory resource pool structure provided in an exemplary embodiment of the present disclosure;
FIG. 5 is a running diagram of a micro-peer process provided in an exemplary embodiment of the present disclosure;
fig. 6 is a schematic diagram of a file structure of a micro server according to an exemplary embodiment of the present disclosure;
fig. 7a and 7b are schematic diagrams of a file structure of a micro-client database and an access process thereof according to an exemplary embodiment of the disclosure;
FIG. 8 is a schematic diagram of a database arrangement process of the micro-client according to an exemplary embodiment of the disclosure;
fig. 9 schematically illustrates a block diagram of an apparatus for processing information resources in a micro-peer in an exemplary embodiment of the present disclosure;
fig. 10 schematically illustrates a structural diagram of an electronic device in an exemplary embodiment of the present disclosure;
FIG. 11 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 embodiments 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 same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
It should be noted that the terms "first," "second," and "third," etc. in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular order or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in other sequences than described or illustrated herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
Furthermore, 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 embodiments of the disclosure can be practiced without one or more of the specific details, or with other methods, components, materials, devices, steps, and so forth. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in the form of software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
First, several terms to which the present disclosure relates are explained:
UID: unique Identity.
RingBuffer, which is used for representing the data structure of a buffer area with fixed size and head-tail connection and is suitable for buffering data streams.
The Table is File Entry Table.
Page: and pages, which store the memory in pages.
MD 5: a widely used cryptographic hash function is used to ensure the integrity and consistency of information transmission.
And (4) GIF: global Index File, Global Index File.
MEF: micro End File, Micro End package File.
Referring now to fig. 1, fig. 1 schematically illustrates a flow chart of a method for processing information resources in a micro-peer in an exemplary embodiment of the disclosure.
In accordance with one embodiment of the present disclosure, there is provided an embodiment of a method for processing information resources in a micro-peer, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
A method for processing information resources in a micro-peer according to one or more embodiments of the present disclosure may include the following steps, as shown in fig. 1:
step S110, receiving a resource request from a game client; wherein the initial version of the game run by the game client is a low resolution version, the low resolution assets of the low resolution version are stored in the game client, and the high resolution assets of the game are stored in a micro-client database or a micro-client server, the high resolution assets comprising one or more high resolution asset files.
Step S120, responding to the resource request, and detecting whether a high-resolution resource file for the resource request exists in the memory resource pool; the memory resource pool is used by one or more game clients and the micro-terminal.
Step S130, if the high resolution resource file does not exist in the memory resource pool, writing the high resolution resource file stored in the micro-end database or the micro-end server into the memory resource pool.
Step S140, if the high resolution resource file exists in the memory resource pool, returning the information of the high resolution resource file to the game client, so that the game client loads the high resolution resource file from the memory resource pool.
According to the method for processing the information resources in the micro-terminal, at least the problem that the high-resolution resources and the low-resolution resources of the game cannot be stored in a split mode and the problem of how to switch the game from the low-resolution version to the high-resolution version in real time without perception are solved.
In an alternative embodiment, referring to fig. 2, fig. 2 schematically illustrates a flow chart of a further method of processing information resources in a micro-peer in an exemplary embodiment of the disclosure. The method for processing information resources in the micro-terminal according to one or more embodiments of the present disclosure further includes the steps of:
step S150, receiving a release request from a game client; and responding to the release request, clearing the high-resolution resources in the memory resource pool, and enabling the game client to only load the low-resolution resources.
According to the further method of processing information resources in the micro-peer of the present exemplary embodiment, at least the problem that the game cannot be seamlessly switched between the low resolution version and the high resolution version is solved.
In an optional embodiment, the method includes step S160, if it is detected that there is no high-resolution resource file for which the resource request is directed in the micro-client database or the high-resolution resource file needs to be updated, downloading the high-resolution resource file from the micro-client server to write into the memory resource pool and store the high-resolution resource file in the micro-client database.
In an alternative embodiment, the method includes step S170, cleaning the high-resolution resource whose unused time length reaches a threshold in the database of the backend.
In order to better understand the method for processing information resources in the micro-peer of the present disclosure, the micro-peer used in the embodiments of the present disclosure is described first. The micro-client is a micro-client, which can be used to process game resources, and help the game client load and/or release the game resources through the interface with the game client. In one or more embodiments of the present disclosure, the micro-peer and the game client operate independently, and even if the micro-peer has a program problem, the game operation is not affected. In one or more embodiments of the present disclosure, one micro-peer may simultaneously serve multiple game processes and/or multiple games of one game to meet the game break-even requirements. The micro-client may support running in parallel with multiple game clients. In one or more embodiments of the present disclosure, the micro-client may be a stand-alone client running on the user terminal, or may run embedded in the game client.
In a user interaction at the micro-end, a user may select a storage directory storing high resolution assets of the game, which may be stored in a different location than low resolution assets of a low resolution version of the game. For example, the low-resolution resources and the high-resolution resources may be stored in different partitions of the same hard disk, or may be stored in different hard disks, e.g., the low-resolution resources may be stored in a solid state disk and the high-resolution resources may be stored in a mechanical hard disk. Before the high resolution resources are enabled, the version in which the game is actually running is a low resolution version, and these high resolution resources may be categorized into one or more high resolution resource files (e.g., hero character high definition package, non-hero character high definition package, scene nature high definition package, and other high definition resource packages) for selection and application by the user. After the high-resolution resource is enabled, the corresponding checked high-resolution resource file may be loaded by the game client during game play. For example, in the case of only checking out a "hero character high-definition package", when a hero character needs to be rendered in a game picture, the game client finds and loads a high-resolution resource file of the hero character, and if the high-resolution resource file is not found, the resource is downloaded and real-time rendering is automatically loaded after the downloading is finished. After disabling the high resolution resource or shutting down the micro-peer, the game client may resume the game back to the low resolution version to continue running if no high resolution resource is currently available for documentation. In addition, the butt joint between the micro-end and the game client is completed through a memory resource pool, and the memory limit size of the memory resource pool can also be set on the user interface of the micro-end.
Hereinafter, each step of the method of processing the information resource in the micro-peer in the present exemplary embodiment will be further described. Fig. 3 is a framework diagram of a micro-client communicating with a game client according to an exemplary embodiment of the present disclosure.
As shown in fig. 3, a backend process in a backend 301 and one or more game processes (e.g., game process 1 and game process 2) in a game client 302 may communicatively interface for high resolution resources via a shared memory (e.g., memory resource pool 303). When a game process needs a high-resolution resource to be used in real time, the high-resolution resource can be written into the memory resource pool 303 so as to be loaded by a game client.
In step S110, for one or more high-resolution resource files selected by the user, if the game process 1 and/or the game process 2 encounters a need to load the high-resolution resource files for real-time rendering during the game running process, a resource request for the specific high-resolution resource file (S) is first sent to the backend process, so that the backend can receive the resource request for subsequent operations. However, when the user does not perform the checking on the high-resolution resource file (i.e., the high-resolution resource does not need to be started), or when the high-resolution resource file checked by the user does not need to be loaded for real-time rendering during the running process of the game, the micro-terminal does not receive the resource request for the high-resolution resource file from the game client, and the game client still keeps the low-resolution version running at this time.
In step S120, when the game process requests a resource, it is first checked whether the memory resource pool 303 has a requested high resolution resource file. In one or more embodiments of the present disclosure, each high resolution resource file includes a unique identification number UID stored in the memory resource pool 303, and when checking whether the requested high resolution resource file exists in the memory resource pool 303, it is only necessary to check whether the UID of the high resolution resource file exists in the memory resource pool 303. If the high-resolution resource file exists, the micro-terminal process directly returns the related information of the high-resolution resource file to the game process; otherwise, if the high resolution resource file is locally (e.g., in the micro-client database, which will be described in fig. 7), the high resolution resource file is read from the local storage and written into the memory resource pool 303, and if the high resolution resource file is not locally available or needs to be updated, the high resolution resource file is downloaded from the network (e.g., in the micro-client server 304, which will be described in fig. 6), written into the memory resource pool 303, and stored locally. It should be noted that "local" herein means that the micro-terminal database storing the high-resolution resources is different from the local storage location of the low-resolution version of the game. In one example, the micro-end database may be located on the D-disk of the local computer and the low resolution version of the game may be stored locally on the C-disk of the computer. In another example, the micro-end database may be located on a mechanical hard disk of the local computer, and the low resolution version of the game may be stored locally on a solid state hard disk of the computer. Then, the micro-process replies the related information (e.g., related to the index information) of the specific high resolution resource file in the memory resource pool 303 to the game process 1 and/or the game process 2 so that the game process can read and load the high resolution resource from the memory resource pool 303 according to the related information. And after the game process uses the high-resolution resources, releasing the high-resolution resources by sending a release command to the micro-terminal process.
It should be noted that the framework for the micro-terminal to communicate with the game client can be implemented by the server and one or more terminals. The server may be a background service for providing information resource downloading. The server can comprise a micro-server, a server cluster or a cloud platform. The terminal can be an intelligent terminal which locally runs a micro terminal and a game client: for example, computers, smart phones, tablets, PDAs (Personal Digital assistants), multimedia players, wearable devices, and the like.
As described above, multiple game processes interface with the micro-client process through the shared memory. In addition to the memory resource pool 303, the shared memory also includes a list of independent requests, releases, replies for each game process: for example, request list 305-1, release list 306-1, and reply list 307-1 for game process 1, and request list 305-2, release list 306-2, and reply list 307-2 for game process 2. Alternatively, each list may be implemented using a RingBuffer to optimize access speed. Among them, RingBuffer is called circular buffer, from Linux kernel, and provides a lock-free method to solve the contention problem in some special cases.
In steps S110-S150, receiving the resource request from the game client includes performing, by the micro-peer: reading a request list, wherein the request list is written by the game client with resource requests for a high resolution resource file; returning the information of the high resolution resource file to the game client comprises: writing the index information of the high-resolution resource file into a reply list according to the sequence number, wherein the reply list is read by the game client; in response to the release request, flushing the high resolution resources in the memory resource pool comprises: reading a release list, wherein the release list is written with the release request by the game client. Alternatively, the data exchange between the micro-terminal and the game client can be realized through other data writing formats.
In one or more embodiments of the present disclosure, the game process writes the resource request and the release request into the request list and the release list respectively, the micro-peer process reads the resource request from the request list, reads the latest resource from the local or from the micro-peer server, and writes the related information of the high-resolution resource file into the reply list, for example, writes the index information of the high-resolution resource file into the reply list according to the sequence number: the sequence number of the first index information is 1, the sequence number of the second index information is 2, and so on; and simultaneously writing the file content of the high-resolution resource file into the memory resource pool. And after the game process uses up the resources, the release request is put into a release list, the micro-terminal process reads the release request, and the space is released from the memory resource pool. Different game processes can share the same resource file in the memory sharing, so that the memory occupation is reduced.
In one or more embodiments of the present disclosure, the memory resource pool 303 may be configured in units of pages. Referring specifically to fig. 4, fig. 4 is a diagram of a memory resource pool structure according to an exemplary embodiment of the present disclosure. The memory resource pool can be composed of a first Page (Page0) to an Nth Page (Page N-1).
In step S130, writing the high resolution resource file into the memory resource pool includes: and configuring index information of the high-resolution resource file on the first page of the memory resource pool, and configuring file contents of the high-resolution resource file on the residual space of the first page and subsequent pages of the memory resource pool.
Specifically, the memory resource pool has two structures (such as Page0 and Page N-1 in FIG. 4): the Page0 contains a file index table for each high-resolution resource file, and subsequent pages (e.g., Page1 through Page-1) store only the file contents of each high-resolution resource file. Optionally, other data containers, such as hash tables, may also be used to write the high-resolution resource file into the memory resource pool.
In one or more embodiments of the present disclosure, the index information includes a unique identification number UID of the high-resolution resource file, a file content size, and a file content location.
Specifically, the file index table is a space fixedly allocated in Page0, for example, a maximum of 10240 indexes can be stored. Alternatively, each index result, such as the file index information structure in fig. 4, may be divided into three parts: UID, file content size (size), and file content location.
In one or more embodiments of the present disclosure, the file content of the high-resolution resource file is divided into one or more chunks, wherein the file content location in the index information indicates a page number, an offset, a length corresponding to each chunk.
Specifically, in order to improve the memory utilization, each file content is divided into 4 blocks at most for storage. Each block corresponds to an index: the page number (page) corresponding to each block, the offset (offset) in the page, and the size (len) of the block. The index in the reply list is the sequence number of the file index table.
In step S140, the game process finds the index information of the high-resolution resource file according to the sequence number, so as to extract the file content of the corresponding high-resolution resource file. Optionally, the size of the memory resource pool varies with the speed of resource request and resource release. Optionally, when the number of pages in the memory resource pool is not enough, a new page is actively applied. Alternatively, a page is actively reclaimed when it is idle for 5 seconds. Alternatively, the player may set the maximum size of the pool of memory resources.
Fig. 5 shows a running diagram of a micro-end process provided by an exemplary embodiment of the present disclosure, where the micro-end process mainly includes a read thread 501, a download thread 502, a write thread 503, and a release thread 504.
In one or more embodiments of the present disclosure, the reading thread 501 is responsible for obtaining the resource request of the game process 1 from the request list 305-1, and determining whether there is a high resolution resource file in the memory resource pool 303 for which the request is made: if so, writing the index information into the reply list 307-1 according to the serial number, so that the game process 1 can find the file content of the high-resolution resource file from the memory resource pool 303 according to the index in the reply list 307-1; if not, the downloading request is read from the micro-terminal database 505 or is sent to the downloading thread 502. After reading the corresponding high-resolution resource file, the reading thread 501 writes the file content into the memory resource pool 303, and writes the index information into the reply list 307-1 according to the sequence number.
In one or more embodiments of the present disclosure, the download thread 502 is responsible for processing the read request sent by the read thread 501, then initiating a download request to the micro-server 304 (downloading of the high resolution resource in the micro-server 304 will be further explained in fig. 8), retrieving the high resolution resource file, and then writing the high resolution resource file into the memory resource pool 303 and the reply list 307-1 according to the file content and the index information, respectively. It is noted here that if the requested high resolution resource file exists in the backend database 505 without downloading from the backend server 304, it is determined whether the high resolution resource file is to be updated. If the download and update are not needed, the download thread 502 is suspended and does not work; the download thread 502 downloads the latest resources from the micro-end server 304 if updates are needed. The determination of whether a download or update is required is further illustrated in fig. 8.
In one or more embodiments of the present disclosure, the write thread 503 is responsible for initiating a write request to the micro-peer database 505, saving a high resolution resource file to the micro-peer database 505 (access to the high resolution resource in the micro-peer database 505 will be further described in fig. 7), or for cleaning the micro-peer database 505 (cleaning of the high resolution resource in the micro-peer database 505 will be further described in fig. 8).
In step S150, in response to the release request, clearing the high resolution resource in the memory resource pool includes: setting and incrementing a reference count corresponding to the high resolution resource in response to the resource request; reading a release list, decrementing the reference count, wherein the release list is written to by the game client with the release request; clearing the high resolution resource in the memory resource pool in response to the reference count being equal to 0.
In step S150, in response to the release request, clearing the high resolution resource in the memory resource pool further includes: reading a release list, wherein the release list is written with the release request by the game client; and clearing the high-resolution resource file aiming at the release request in the memory resource pool.
In one or more embodiments of the present disclosure, the release thread 504 is responsible for reading the release request from the release list 306-1 from game process 1, thereby clearing the high resolution resource in the memory resource pool or clearing the high resolution resource file in the memory resource pool for which the release request is directed.
Fig. 6 is a schematic diagram of a file structure of a micro server according to an exemplary embodiment of the present disclosure. Specifically, the schematic diagram shows a scheme for downloading or updating a high-resolution resource file from a server (i.e., a micro-server).
In step 160, the high resolution resource files are stored in the micro-peer server in the form of an external index file and an external package file, wherein the external index file includes names of one or more high resolution resource files and a file entry sequence, the file entry sequence includes UID and MD5 values of the high resolution resource files, and the external package file includes one or more file contents.
In one or more embodiments of the present disclosure, the high resolution resources are stored in the micro-end server in two forms: an external index file (e.g., the server index file 601 shown in fig. 6) and an external package file (e.g., the server package file 602 shown in fig. 6). The high-resolution resource stored in the micro-end server is a source of a high-resolution file of the micro-end process, and the position of the high-resolution resource on the micro-end server needs to be determined in order to facilitate the micro-end to judge whether the resource needs to be downloaded. Dividing the high-resolution resource into a server index file 601 and a server packaging file 602 in the micro-server: the structure of the server side package file 602 is stored by package files 1, 2, … end to end; the structure of the server-side index file 601 includes a packed file name sequence and a file entry sequence, 256 packed file name sequences are reserved, the actual number of use is specified by the actual number of the packed file names, and the total number of the file entry sequence is the total number of the packed files. Each file entry 603 contains fields for each high resolution resource file, such as UID, packet name number, offset in packet, file size, MD5 value, type of high resolution file (i.e., high definition packet type as shown), and reserved bits, for indicating the storage location of each high resolution resource file in the server side package file 602.
In one or more embodiments of the present disclosure, the packet name number is used to determine in which packed file each high resolution resource file is, respectively, and the offset in the packet is used to determine the specific location in the packed file. It should be noted that the "package" in fig. 6 is a package file corresponding to each high-resolution resource file in the external package files (e.g., the server side package file 602 shown in fig. 6) stored in the micro-server.
In step 160, detecting whether there is a high resolution resource file in the micro-client database for which the resource request is directed includes: detecting whether a local index file in the micro-terminal database contains the UID of the high-resolution resource file aimed at by the resource request. Alternatively,
in one or more embodiments of the present disclosure, in addition to the splitting of the high-resolution resources into the external index file and the external package file in the micro-peer server, the high-resolution resources downloaded from the micro-peer server into the micro-peer database are also split into a local index file and a local package file (as will be further explained in fig. 7). Whether the high-resolution resource file exists in the micro-terminal database can be judged by detecting whether the local index file contains the UID of the high-resolution resource file for which the resource request aims: if yes, downloading from the micro-terminal server is not needed; otherwise, determining the storage position of the high-resolution resource file on the micro-terminal server according to the UID of the high-resolution resource file, and downloading and storing the high-resolution resource file into the micro-terminal database.
In step 160, detecting whether the high resolution resource file in the micro-client database needs to be updated includes: and comparing the MD5 value of the high-resolution resource file in the micro-terminal database with the MD5 value of the high-resolution resource file in the micro-terminal server, and if the values are not the same, judging that the update is needed. Optionally, the manner of detecting whether the update is needed may further include comparing the file number on the server with the file number on the local micro-client database, adding an update field newly, and the like.
In one or more embodiments of the present disclosure, the MD5 value may be used to determine whether a local file (i.e., a high resolution resource file already stored in the micro-peer database) needs to be updated and is correct. The judgment can be made by comparing whether the MD5 value of the high-resolution resource file stored in the micro-peer database is consistent with the MD5 value of the corresponding high-resolution resource file in the micro-peer server: if the data are consistent, downloading from the micro-end server is not needed; otherwise, judging that the local file is outdated and needs to be updated or the file is incorrect, and downloading the latest high-resolution resource file from the micro-terminal server.
Fig. 7 is a schematic diagram of a file structure of a micro-client database and an access process thereof according to an exemplary embodiment of the disclosure.
Fig. 7a shows a schematic diagram of a file structure of the micro-end database. In step 160, the high resolution resource file is stored in the micro-peer database in the form of a local index file and a local packaged file, wherein the local index file includes a packaged file index table and mapping information of the UID to the local packaged file, the packaged file index table includes UID and MD5 values of the high resolution resource file, and the local packaged file includes a packaged file index table address and one or more file contents.
In one or more embodiments of the present disclosure, the micro-peer database is composed of a global index file GIF file 701 (i.e., a local index file) and a plurality of micro-peer package file MEF files 702 (i.e., local package files). In one or more embodiments of the present disclosure, the GIF file 701 is composed of a file header, 256 MEF index tables, and UID to MEF file mapping information (i.e., UID2MEF index information sequence as shown in the figure) of the file. The UID2MEF index information sequence has no upper limit, and the newly added files keep the same structure and are attached to the tail of the files. In one or more embodiments of the present disclosure, MEF file 702 is composed of a file header, 16 file index table addresses, a file index table, and file contents. In one embodiment, each file index table may record 1024 files at most, that is, each MEF file may only store 1.6w files at most.
FIG. 7b is a schematic diagram illustrating the accessing process of the GIF file and the MEF file in FIG. 7 a. Optionally, storing the high resolution resource file in the microtip database comprises: mapping information from the UID to a local packaging file is configured in the local index file according to the UID of the high-resolution resource file, wherein the mapping information from the UID to the local packaging file indicates the local packaging file corresponding to the UID and a packaging file index table address in the local packaging file; and storing the file content of the high-resolution resource file at the corresponding position of the local packaged file according to the address of the index table of the packaged file.
In one or more embodiments of the present disclosure, taking an example that the micro-peer process reads the high-resolution resource file whose UID is UID0 from the micro-peer database, first, UID2MEF index information (UID0,0), which is mapping information of the UID to the local package file, is found from the GIF file (i.e., the local index file), and the sub-file of the high-resolution resource file whose UID is UID0 is recorded in the position recorded in the MEF index table No. 0. Then, MEF index table No. 0 is read from the GIF file, which indicates that the corresponding MEF file (i.e., the local packaging file) has a name of 001. Then, the MEF file 001 is read, the file index table containing the uid0 is found from the MEF file, the file entry is found according to the file index table, and the file content is read through the file entry. To speed up the search efficiency, in one embodiment, a pre-process may be performed: and extracting file entries in all the file index tables to make a mapping relation table from the UID to the file entries. Thus, as long as the UID of the requested high-resolution resource file is provided, the corresponding file entry can be directly extracted. And storing the mapping relation table in which the UID and the file entry correspond to each other in a shared memory in a dynamic generation mode, and after preprocessing is finished, the contents of fields in the GIF file and each MEF file do not need to be searched one by one.
Fig. 8 is a schematic diagram of a database arrangement process of the micro-client according to an exemplary embodiment of the disclosure. The collating process here is directed to the MEF file (i.e., the local package file) in the micro-end database as shown in fig. 7.
In step S170, the cleaning of the high-resolution resource whose unused duration reaches the threshold in the micro-end database includes: checking the unused time length of each high-resolution resource file in the micro-terminal database, and if the unused time length exceeds the threshold value, deleting the corresponding high-resolution resource file, wherein the corresponding position of the deleted high-resolution resource file in the local packaging file in the micro-terminal database forms an idle space; and filling up the free space by the file below the free space, so as to reduce the size of the local packaging file.
In one or more embodiments of the present disclosure, the micro-client database defragmentation process includes defragmentation deletion of long-term unused resources, defragmentation of micro-client database files, support for players to designate local storage of high resolution resources. Fragmentation refers to the use of thread idle periods in the micro-end process to accomplish one or more of the above tasks in multiple times. Each high-resolution resource file is used for the first time in the day, the using time is recorded to the database, and then the unused days of the high-resolution resource file in the database of the micro-terminal are actively checked one by one during the idle period of the thread. When the number of unused days exceeds a specified value, the corresponding high resolution resource file may be deleted. Optionally, if a file is deleted, exiting the checking, and continuing when the file is idle next time. After the deletion work is finished, the size of the free space of the data control file is checked one by one during the idle period of the thread, and the database file with the larger free space can form a hole. As shown in fig. 8, the clearing of the holes in the micro-end database is performed 3 times as an example: for the first time, find the most front hole (as indicated by dark gray square), find the actual field content under the hole-e.g., file entry (as indicated by light gray square), copy the file entry into the hole, recycle the remaining space; secondly, finding the uppermost hole (as indicated by a dark grey square, namely, a new hole generated after the first step is completed), finding a file x under the hole, moving the file x upwards to fill the hole, dividing the file x into two blocks (for example, a file x-block 1 and a file x-block 2) for storage, wherein the number of the divided blocks after arrangement is less than or equal to that of the original divided blocks, and the hole after arrangement is below the file x; and thirdly, finding the uppermost hole, finding the hole at the tail of the MEF file, and directly reducing the size of the file to finish sorting. According to one or more embodiments of the disclosure, a player can choose to place a high-resolution resource on any drive letter, then the micro-terminal selects a directory where a high-resolution resource file is located, the micro-terminal can correctly read the high-resolution resource, and after a game client and the micro-terminal are closed, the player is supported to move the storage position of the high-resolution resource.
In an exemplary embodiment of the present disclosure, an apparatus for processing an information resource in a micro-peer is also provided. Referring to fig. 9a, an apparatus 900a may include:
a receiving module 910, configured to receive a resource request from a game client, where an initial version of a game run by the game client is a low resolution version, a low resolution resource of the low resolution version is stored in the game client, and a high resolution resource of the game is stored in a micro-end database or a micro-end server, and the high resolution resource contains one or more high resolution resource files.
The detecting module 920 may be configured to detect, in response to the resource request, whether a high resolution resource file for the resource request exists in a memory resource pool, where the memory resource pool is used by one or more game clients and the micro-client.
The writing module 930 may be configured to write the high-resolution resource file stored in the micro-peer database or the micro-peer server into the memory resource pool if the high-resolution resource file does not exist in the memory resource pool.
The returning module 940 may be configured to, if the high-resolution resource file exists in the memory resource pool, return information of the high-resolution resource file to the game client, so that the game client loads the high-resolution resource file from the memory resource pool.
Optionally, as shown in fig. 9b, the apparatus 900b may further include, in addition to the module 910 and 940:
the clearing module 950 may be configured to clear the high resolution resource in the memory resource pool in response to a release request from a game client, so that the game client only loads the low resolution resource, where the receiving module is further configured to receive the release request from the game client. The receiving module 910 may further be configured to receive a release request from the game client.
The downloading module 960 may be configured to, if it is detected that the high-resolution resource file for which the resource request is directed does not exist in the micro-client database or the high-resolution resource file needs to be updated, download the high-resolution resource file from the micro-client server to be written into the memory resource pool and stored in the micro-client database.
The cleaning module 970 may be configured to clean the high-resolution resource whose unused time length reaches a threshold in the database of the micro-terminal.
It should be understood that the apparatus 900a/900b of fig. 9a/9b is merely an example, and the order of arrangement and the necessity of each block therein are not limited thereto. For example, certain module(s) may not necessarily be present, or the functionality of certain module(s) may be alternatively implemented by other module(s).
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 disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure 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 1000 according to this embodiment of the disclosure is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, a bus 1030 connecting different system components (including the memory unit 1020 and the processing unit 1010), and a display unit 1040.
Where the storage unit stores program code that may be executed by the processing unit 1010 to cause the processing unit 1010 to perform the steps according to various exemplary embodiments of the present disclosure as described in the "exemplary methods" section above in this specification. For example, the processing unit 1010 may perform the steps as shown in fig. 1.
The storage unit 1020 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)10201 and/or a cache memory unit 10202, and may further include a read-only memory unit (ROM) 10203.
The memory unit 1020 may also include a program/utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 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 1030 may be any 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, and a local bus using any of a variety of bus architectures.
The electronic device 1000 may also communicate with one or more external devices 1070 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interfaces 1050. Also, the electronic device 1000 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 1060. As shown, the network adapter 1060 communicates with the other modules of the electronic device 1000 over the bus 1030. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1000, 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, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the disclosure described in the above-mentioned "exemplary methods" section of this specification, when the program product is run on the terminal device.
Referring to fig. 11, a program product 1100 for implementing the above method according to an embodiment of the present disclosure 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 disclosure is not limited thereto, and in this 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 the present disclosure 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 included in methods according to exemplary embodiments of the present disclosure, 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.
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.
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 disclosure 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.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (23)

1. A method for processing information resources in a micro-peer, the method comprising:
receiving a resource request from a game client, wherein an initial version of a game run by the game client is a low resolution version, a low resolution resource of the low resolution version is stored in the game client, and a high resolution resource of the game is stored in a micro-terminal database or a micro-terminal server, the high resolution resource containing one or more high resolution resource files;
responding to the resource request, and detecting whether a high-resolution resource file for the resource request exists in a memory resource pool, wherein the memory resource pool is used by one or more game clients and the micro-client:
if the high-resolution resource file does not exist, writing the high-resolution resource file stored in the micro-terminal database or the micro-terminal server into a memory resource pool;
and if the high-resolution resource file exists, returning the information of the high-resolution resource file to a game client so that the game client can load the high-resolution resource file from the memory resource pool.
2. The method of claim 1, further comprising:
receiving a release request from a game client;
and responding to the release request, clearing the high-resolution resource in the memory resource pool, and enabling the game client to only load the low-resolution resource.
3. The method of claim 1, further comprising:
and if the fact that the high-resolution resource file aimed at by the resource request does not exist in the micro-terminal database or the high-resolution resource file needs to be updated is detected, downloading the high-resolution resource file from a micro-terminal server to write the high-resolution resource file into the memory resource pool and store the high-resolution resource file in the micro-terminal database.
4. The method of claim 3, further comprising:
and cleaning the high-resolution resources of which the unused time length reaches a threshold value in the micro-terminal database.
5. The method of claim 1, wherein receiving a resource request from a game client comprises:
reading a request list, wherein the request list is written by the game client with resource requests for a high resolution resource file.
6. The method of claim 1, wherein the memory resource pool is configured in units of pages,
writing the high-resolution resource file into the memory resource pool comprises the following steps:
and configuring index information of the high-resolution resource file on the first page of the memory resource pool, and configuring file contents of the high-resolution resource file on the residual space of the first page and subsequent pages of the memory resource pool.
7. The method of claim 6, wherein the index information comprises a unique identification number UID of the high-resolution resource file, a file content size, and a file content location.
8. The method of claim 7, wherein the file content of the high resolution resource file is divided into one or more chunks, and wherein the file content location in the index information indicates a page number, an offset, and a length corresponding to each chunk.
9. The method of claim 6, wherein returning information of the high resolution resource file to a game client comprises:
and writing the index information of the high-resolution resource file into a reply list according to the sequence number, wherein the reply list is read by the game client.
10. The method of claim 2, wherein clearing the high resolution resource from the memory resource pool in response to the release request comprises:
setting and incrementing a reference count corresponding to the high resolution resource in response to the resource request;
reading a release list, decrementing the reference count, wherein the release list is written to by the game client with the release request;
clearing the high resolution resource in the memory resource pool in response to the reference count being equal to 0.
11. The method of claim 2, wherein clearing the high resolution resource from the memory resource pool in response to the release request comprises:
reading a release list, wherein the release list is written with the release request by the game client;
and clearing the high-resolution resource file aiming at the release request in the memory resource pool.
12. The method of claim 4, wherein the high resolution resource files are stored in the micro-peer server in the form of an external index file and an external package file, wherein the external index file comprises names of one or more high resolution resource files and a sequence of file entries comprising UID and MD5 values of the high resolution resource files, and wherein the external package file comprises one or more file contents.
13. The method of claim 12, wherein the high resolution resource file is stored in the micro-peer database in the form of a local index file and a local packaged file, wherein the local index file comprises a packaged file index table and UID to local packaged file mapping information, wherein the packaged file index table comprises UID and MD5 values of the high resolution resource file, and wherein the local packaged file comprises a packaged file index table address and one or more file contents.
14. The method of claim 13, wherein detecting whether the high resolution resource file for which the resource request is directed exists in the micro-peer database comprises:
detecting whether a local index file in the micro-terminal database contains the UID of the high-resolution resource file aimed at by the resource request.
15. The method of claim 13, wherein detecting whether the high resolution resource file in the micro-peer database needs to be updated comprises:
and comparing the MD5 value of the high-resolution resource file in the micro-terminal database with the MD5 value of the high-resolution resource file in the micro-terminal server, and if the values are not the same, judging that the update is needed.
16. The method of claim 13, wherein storing a high resolution resource file in the micro-peer database comprises:
mapping information from the UID to a local packaging file is configured in the local index file according to the UID of the high-resolution resource file, wherein the mapping information from the UID to the local packaging file indicates the local packaging file corresponding to the UID and a packaging file index table address in the local packaging file;
and storing the file content of the high-resolution resource file at the corresponding position of the local packaged file according to the address of the index table of the packaged file.
17. The method of claim 13, wherein cleaning up the high resolution resources in the micro-client database that have not been used for a threshold amount of time comprises:
checking the unused time length of each high-resolution resource file in the micro-terminal database, and if the unused time length exceeds the threshold value, deleting the corresponding high-resolution resource file, wherein the corresponding position of the deleted high-resolution resource file in the local packaging file in the micro-terminal database forms an idle space;
and filling up the free space by the file below the free space, so as to reduce the size of the local packaging file.
18. The method of claim 1, wherein the micro-client operates independently of the game client.
19. The method of claim 1, wherein the micro-client supports running in parallel with multiple game clients.
20. The method of claim 1, wherein the micro-tip database is stored in a different location than a low resolution version of the game.
21. An apparatus for processing information resources in a micro-peer, the apparatus comprising:
a receiving module, configured to receive a resource request from a game client, where an initial version of a game run by the game client is a low-resolution version, a low-resolution resource of the low-resolution version is stored in the game client, and a high-resolution resource of the game is stored in a micro-end database or a micro-end server, and the high-resolution resource includes one or more high-resolution resource files;
a detecting module, configured to detect, in response to the resource request, whether a high-resolution resource file for the resource request exists in a memory resource pool, where the memory resource pool is used by one or more game clients and the micro-client:
a writing module, configured to write the high-resolution resource file stored in the micro-end database or the micro-end server into the memory resource pool if the high-resolution resource file does not exist in the memory resource pool;
and the return module is used for returning the information of the high-resolution resource file to a game client if the high-resolution resource file exists in the memory resource pool so that the game client can load the high-resolution resource file from the memory resource pool.
22. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of processing information resources in a micro-peer of any of claims 1-20 via execution of the executable instructions.
23. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method of processing information resources in a micro-peer according to any one of claims 1 to 20.
CN202110519097.7A 2021-05-12 2021-05-12 Method and device for processing information resource in micro-terminal, electronic equipment and storage medium Pending CN113384872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110519097.7A CN113384872A (en) 2021-05-12 2021-05-12 Method and device for processing information resource in micro-terminal, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110519097.7A CN113384872A (en) 2021-05-12 2021-05-12 Method and device for processing information resource in micro-terminal, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113384872A true CN113384872A (en) 2021-09-14

Family

ID=77617010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110519097.7A Pending CN113384872A (en) 2021-05-12 2021-05-12 Method and device for processing information resource in micro-terminal, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113384872A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626391A (en) * 2008-07-08 2010-01-13 盛大计算机(上海)有限公司 Method for processing resource of network game client
CN104503784A (en) * 2014-12-16 2015-04-08 珠海金山网络游戏科技有限公司 Method and system for controlling micro-client downloading by using script
CN105052160A (en) * 2012-11-20 2015-11-11 谷歌技术控股有限责任公司 Method and apparatus for streaming media content to client devices
CN105635264A (en) * 2016-03-28 2016-06-01 庄铭宇 File system based on network game application
US9426543B1 (en) * 2015-12-18 2016-08-23 Vuclip (Singapore) Pte. Ltd. Server-based video stitching
US20170287436A1 (en) * 2016-04-04 2017-10-05 Yandex Europe Ag Method and system of downloading image tiles onto a client device
US20170287437A1 (en) * 2016-04-04 2017-10-05 Yandex Europe Ag Method and system of downloading image tiles onto a client device
CN111931781A (en) * 2020-08-10 2020-11-13 商汤集团有限公司 Image processing method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626391A (en) * 2008-07-08 2010-01-13 盛大计算机(上海)有限公司 Method for processing resource of network game client
CN105052160A (en) * 2012-11-20 2015-11-11 谷歌技术控股有限责任公司 Method and apparatus for streaming media content to client devices
CN108600784A (en) * 2012-11-20 2018-09-28 谷歌技术控股有限责任公司 To the method, apparatus and storage medium of client device streaming media content
CN104503784A (en) * 2014-12-16 2015-04-08 珠海金山网络游戏科技有限公司 Method and system for controlling micro-client downloading by using script
US9426543B1 (en) * 2015-12-18 2016-08-23 Vuclip (Singapore) Pte. Ltd. Server-based video stitching
CN105635264A (en) * 2016-03-28 2016-06-01 庄铭宇 File system based on network game application
US20170287436A1 (en) * 2016-04-04 2017-10-05 Yandex Europe Ag Method and system of downloading image tiles onto a client device
US20170287437A1 (en) * 2016-04-04 2017-10-05 Yandex Europe Ag Method and system of downloading image tiles onto a client device
CN111931781A (en) * 2020-08-10 2020-11-13 商汤集团有限公司 Image processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11157449B2 (en) Managing data in storage according to a log structure
JP2020173840A (en) Efficient live migration of remotely accessed data
US10223021B2 (en) Handling failure of a command to add a record to a log
US20090132621A1 (en) Selecting storage location for file storage based on storage longevity and speed
CN108647151A (en) It is a kind of to dodge system metadata rule method, apparatus, equipment and storage medium entirely
US20180225058A1 (en) Write filter with dynamically expandable overlay
US9471366B2 (en) Virtual machine disk image backup using block allocation area
US9658799B2 (en) Data storage device deferred secure delete
US20220004405A1 (en) 3D API Redirection for Virtual Desktop Infrastructure
CN113806300B (en) Data storage method, system, device, equipment and storage medium
US11157456B2 (en) Replication of data in a distributed file system using an arbiter
CN115114232A (en) Method, device and medium for enumerating historical version objects
KR20090053487A (en) Method of demand paging for codes which requires real time response and terminal
CN113384872A (en) Method and device for processing information resource in micro-terminal, electronic equipment and storage medium
JP6529678B2 (en) Method and device for accelerating the execution of an application
US10509578B2 (en) Logical address space for storage resource pools
US20150220405A1 (en) In-memory continuous data protection
US10530870B2 (en) Direct volume migration in a storage area network
CN110941511B (en) Snapshot merging method, device, equipment and storage medium
US11875051B2 (en) Contiguous data storage using group identifiers
CN115344536A (en) File processing method and device, server and readable storage medium
CN117667307A (en) Virtual machine starting method, device, equipment and storage medium
CN114461578A (en) Data optimization processing method in network dynamic virtual synthesis technology
CN117724729A (en) Method and equipment for quickly importing mirror image to storage server
CN117544641A (en) Cloud host image uploading method and device

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