Game work display method and device, electronic equipment and readable storage medium
By working in tandem with the game server, relay server, and artwork database, the problem of players' artwork not being able to be displayed across servers was solved, enabling cross-server display, improving the playability of artwork, and reducing database access pressure.
Patent Information
- Application Number
- CN202211692014.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-12-28
AI Technical Summary
In existing technology, player-created game works cannot be displayed across servers, resulting in low playability.
By working in concert with the game server, relay server, and artwork database, the system periodically retrieves artwork data packets from the relay server and saves them to the local cache. Upon receiving a client request, it searches the cache and returns the displayed image, thus enabling cross-server display.
It enables cross-server display of player creations, improves the playability of the creations, and reduces the access pressure on the creation database.
Smart Images

Figure CN115957513B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of games, and more specifically, to a method, apparatus, electronic device, and readable storage medium for displaying game works. Background Technology
[0002] Nowadays, most games designed by major game developers offer players customizable features, such as allowing players to design their own game characters, create their own character faces, and build their own buildings.
[0003] However, most of these player-created works are saved locally and cannot be displayed to other players on the same server or across servers. This limitation restricts player-created works to local storage, resulting in low playability. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, electronic device, and readable storage medium for displaying game works, so as to improve the problems existing in the prior art.
[0005] The embodiments of the present invention can be implemented as follows:
[0006] In a first aspect, the present invention provides a method for displaying game content, applied to a game server, wherein the game server is communicatively connected to a relay server, and the relay server is also communicatively connected to a content database and multiple other game servers, the content database storing all content data uploaded by game players corresponding to all the game servers; the method includes:
[0007] A first work acquisition request is sent to the relay server every first preset period;
[0008] The system receives a data packet of a work returned by the relay server based on the first work acquisition request, and saves the data packet of the work to a first local work cache space; the data packet of the work is obtained from the second local work cache space of the relay server; the data packet of the work includes work data of at least one player's work, and the work data includes a display image of the player's work;
[0009] When a work browsing request is received from the game client, the display images of all player works that match the work browsing request are searched in the first local work cache space;
[0010] The display images of all the players' works are returned to the game client so that the game client can display all the display images on the work display interface.
[0011] In an optional implementation, the method further includes:
[0012] When a work upload request is received from the game client, it is determined whether the game client meets the work upload conditions; the work upload request includes the original work data of the work to be uploaded;
[0013] If the conditions are met, the original work data is encoded according to the set encoding rules to obtain the encoded work data;
[0014] The encoded work data is sent to the relay server, so that the relay server sends the encoded work data to the work database for storage.
[0015] In an optional implementation, the artwork data further includes model data of player artworks; the method further includes:
[0016] When a model retrieval request is received from the game client, the work data of the specified player's work corresponding to the model retrieval request is retrieved from the first local work cache space; wherein, the model retrieval request is generated after the user clicks on the display image of the specified player's work on the work display interface;
[0017] The model data of the specified player's work is returned to the game client so that the game client can display the specified player's work on the work details interface.
[0018] Secondly, the present invention also provides a method for displaying game works, applied to a relay server, wherein multiple game servers are communicatively connected to the relay server, and the relay server is communicatively connected to a work database, the work database storing all work data uploaded by game players corresponding to all the game servers; the method includes:
[0019] Receive a first game acquisition request sent by the target game server every first preset period, wherein the target game server is any one of the plurality of game servers;
[0020] Search the second local work cache space for all player works that match the first work retrieval request, and return the work data packaged from all player work data to the target game server.
[0021] When the target game server receives a work browsing request from the game client, the target game server queries the first local work cache space to find all display images of player works that match the work browsing request, and returns all display images of player works to the game client so that the game client can display all the display images on the work display interface.
[0022] In an optional implementation, the method further includes:
[0023] Receive the encoded work data of the work to be uploaded sent by the target game server;
[0024] The encoded work data is obtained by the target game server encoding the original work data of the work to be uploaded according to a set encoding rule; the original work data is obtained by the target game server from the work upload request sent by the game client.
[0025] The encoded work data is sent to the work database so that the work database stores the encoded work data.
[0026] In an optional implementation, before the step of receiving a first game acquisition request sent by the target game server every first preset period, the method further includes:
[0027] Every second preset period, a second work retrieval request is sent to the work database;
[0028] The system receives work data of multiple player works returned by the work database based on the second work acquisition request, and saves the work data of the multiple player works to the second local work cache space.
[0029] Thirdly, the present invention also provides a game work display device, applied to a game server, wherein the game server is communicatively connected to a relay server, and the relay server is also communicatively connected to a work database and multiple other game servers, wherein the work database stores all work data uploaded by game players corresponding to all the game servers; the device includes:
[0030] The first request module is used to send a first work acquisition request to the relay server every first preset period;
[0031] The first receiving module is configured to receive the work data packet returned by the relay server based on the first work acquisition request, and save the work data packet to the first local work cache space; the work data packet is obtained from the second local work cache space of the relay server; the work data packet includes work data of at least one player's work, and the work data includes the display image of the player's work;
[0032] When a work browsing request is received from a game client, the first receiving module is also used to search for display images of all player works that match the work browsing request in the first local work cache space;
[0033] The first sending module is used to return the display images of all the players' works to the game client, so that the game client can display all the display images on the work display interface.
[0034] Fourthly, the present invention also provides a game work display device, applied to a relay server, wherein multiple game servers are communicatively connected to the relay server, and the relay server is communicatively connected to a work database, the work database storing all work data uploaded by game players corresponding to all the game servers; the device includes:
[0035] The second receiving module is used to receive a first work acquisition request sent by the target game server every first preset period, wherein the target game server is any one of the plurality of game servers;
[0036] The second receiving module is further configured to search for all player works data that match the first work acquisition request in the second local work cache space, and return the work data package obtained by packaging the work data of all player works to the target game server;
[0037] When the target game server receives a work browsing request from the game client, the target game server queries the first local work cache space to find all display images of player works that match the work browsing request, and returns all display images of player works to the game client so that the game client can display all the display images on the work display interface.
[0038] Fifthly, the present invention also provides an electronic device, including: a memory and a processor, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to implement the game display method provided in the first aspect embodiment or the second aspect embodiment.
[0039] In a sixth aspect, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the game display method provided in the first or second aspect embodiment described above.
[0040] Compared with existing technologies, embodiments of the present invention provide a method, apparatus, electronic device, and readable storage medium for displaying game works. The game server periodically sends a first work retrieval request to a relay server, receives work data packets returned by the relay server based on the first work retrieval request, and saves them to a first local work cache space. When a work browsing request is received from a game client, the game server searches the first local work cache space for display images of all player works matching the browsing request. All display images are then returned to the game client so that the game client can display all display images on the work display interface. In this way, by using a work database to store all work data uploaded by game players corresponding to all game servers, and periodically retrieving work data packets from the relay server, the game server can promptly return the corresponding display images to the game client upon receiving a work browsing request, enabling player works to be displayed across servers rather than being limited to local storage. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present invention.
[0043] Figure 2 This is one of the flowcharts illustrating a method for displaying game content according to an embodiment of the present invention.
[0044] Figure 3 This is a second flowchart illustrating a method for displaying game content, as provided in an embodiment of the present invention.
[0045] Figure 4 This is a schematic diagram of the application structure of the game server and relay server provided in an embodiment of the present invention.
[0046] Figure 5 This is the third flowchart illustrating a method for displaying game content, as provided in an embodiment of the present invention.
[0047] Figure 6 This is one of the structural schematic diagrams of a game display device provided in an embodiment of the present invention.
[0048] Figure 7 This is a second structural schematic diagram of a game display device provided in an embodiment of the present invention.
[0049] Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0051] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0052] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0053] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0054] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0055] The application scenarios of the embodiments of the present invention will be introduced first.
[0056] Please see Figure 1 , Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1 In this system, the player content service system 100 may include several game servers, a relay server, and a content database. Each game server corresponds to multiple game clients running on terminal devices, and each game client hosts one logged-in online player. All game servers are connected to the content database through the relay server.
[0057] Player-created works can include game character models, custom-made character facial models, and self-built building models. Any player can choose to upload their work from the game client through the game server or a relay server to the work database.
[0058] Therefore, the works database can be used to store the works data of all player works uploaded by all game clients under all game servers.
[0059] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a method for displaying game content according to an embodiment of the present invention. The execution entity of this method may be the aforementioned... Figure 1 The game server shown communicates with a relay server, which in turn communicates with multiple other game servers and a content database. This content database stores all content uploaded by players across all game servers. The method for displaying game content includes the following steps:
[0060] S110. Send the first work retrieval request to the relay server every first preset period.
[0061] In this embodiment, combined with Figure 1 For any given game server, it will send a first work retrieval request to the relay server every first preset period. This first work retrieval request can be generated by the game server based on set request rules. In an optional example, the set request rules can determine the number and attribute categories of player works requested each time. The attribute category can be at least one of the following: work upload time, work likes, and work downloads.
[0062] For example, the request rules can be set to at least one of the following: the most recently uploaded works by players, the most likes by players, or the most downloads by players. This example is for illustrative purposes only and is not intended to be limiting.
[0063] S120: Receive the data packet of the work returned by the relay server based on the first work acquisition request, and save the data packet of the work to the first local work cache space.
[0064] In this embodiment, the work data package may include work data of at least one player's work, and the work data may include a display image of the player's work, which is a thumbnail of the player's work.
[0065] It is understandable that the first local game cache space can be specifically used to cache game data retrieved periodically from the relay server. If the capacity of the first local game cache space is limited, the game server will only execute the above step S110 to periodically request game data from the relay server if there is remaining space in the first local game cache space.
[0066] Because the game database stores all player-uploaded game data across all game servers, a relay server is used to alleviate access pressure on the database. This relay server can include a second local game cache space. The relay server can periodically retrieve game data from the database and pre-store it in this second local cache space. Then, each game server can periodically retrieve game data from this second local cache space on the relay server.
[0067] Therefore, in combination Figure 1 For the relay server, when it receives the first work retrieval request from game server 1, it can search for the work data of all player works that match the first work retrieval request from the second local work cache space, and then package them into a work data package and return it to game server 1.
[0068] S130. When a work browsing request is received from the game client, search the first local work cache space for display images of all player works that match the work browsing request.
[0069] S140. Return all player artwork display images to the game client so that the game client can display all display images on the artwork display interface.
[0070] In this embodiment, because the game server obtains the data of several player works from the relay server and stores it in the second local work cache space through the above steps S110 and S120, when the game server receives a work browsing request sent by a game client, it can directly search the second local work cache space for display images of all player works that match the work browsing request. All player works that match the work browsing request can be uploaded to the work database by game players on different game servers. The game client directly displays these display images on the work display interface for game players to browse, thus realizing cross-server display of player works.
[0071] Furthermore, since the game server does not need to send viewing requests to the game database in exchange for game data, the game database is spared the access pressure from various game clients under various game servers.
[0072] This invention provides a method for displaying game content. The game server periodically sends a first content retrieval request to a relay server, receives content data packets returned by the relay server based on the first content retrieval request, and saves these packets to a first local content cache space. When a content browsing request is received from a game client, the game server searches the first local content cache space for display images of all player content matching the request. All display images are then returned to the game client so that the game client can display all display images on the content display interface. In this way, by using a content database to store all content data uploaded by game players corresponding to all game servers, and periodically retrieving content data packets from the relay server, the game server can promptly return the corresponding display images to the game client upon receiving a content browsing request, enabling player content to be displayed across servers instead of being limited to local storage.
[0073] In an optional implementation, game players on the game server can choose to upload their creations after completion. The creation data is saved to the creation database as encoded data according to a set encoding rule. Figure 2 Based on this, please refer to Figure 3 The method may also include:
[0074] S150. When a work upload request is received from a game client, determine whether the game client meets the work upload conditions.
[0075] In this embodiment, the work upload request may include the original work data of the work to be uploaded. Upload conditions may include the number of player works uploaded by the same player per day not exceeding the daily upload limit (e.g., a daily upload limit of 3), or the time interval between two uploads by the same player must be a set duration (e.g., a set duration of 6 hours). It is understood that this example is merely illustrative and is not intended to be limiting.
[0076] If a player logged into the game client does not meet the requirements for uploading their work, then the following steps S160 can be executed; if a player logged into the game client meets the requirements for uploading their work, then the following steps S170~S180 can be executed.
[0077] S160. Discard the upload request and send an upload failure message to the game client.
[0078] S170. Encode the original work data according to the set encoding rules to obtain the encoded work data.
[0079] S180. Send the encoded work data to the relay server so that the relay server can send the encoded work data to the work database for storage.
[0080] In an optional example, the encoding rule can be set to base64, which is one of the common encoding methods used to transmit 8-bit byte code.
[0081] The following section provides an example of the process for uploading player-created artwork. Please see below. Figure 4 A schematic diagram of the application structure of game servers and relay servers.
[0082] Combination Figure 1 Please see Figure 2 Taking the player work service system 100, which includes two game servers (game server 1 and game server 2), as an example, the game server includes a Z main process, and the relay server includes an A main process. The Z main process and the A main process are respectively responsible for the transaction processing of player works on the game server and the relay server.
[0083] Assume that both game server 1 and game server 2 are allocated 400 players. In game server 1, the Z child processes 1, 2, 3, and 4 of the main process Z can correspond to players 1-100, 102-200, 201-300, and 301-400, respectively. In game server 2, the Z child processes 1, 2, 3, and 4 of the main process Z can correspond to players 401-500, 501-600, 601-700, and 701-800, respectively.
[0084] Correspondingly, in order to balance the access pressure from various game servers to the relay server, the A main process in the relay server can include A child process 1 and A child process 2. A child process 1 and A child process 2 are respectively connected to the A main process of game server 1 and the A main process of game server 2.
[0085] Therefore, assuming player 50 needs to upload their artwork, the game client logged in with player 50 will generate an upload request and send it to game server 1. Game server 1's child process 1 will process the upload request, and the processing procedure is as follows:
[0086] First, determine whether the work upload request meets the work upload conditions. If it does not meet the conditions, discard the work upload request. If it does meet the conditions, encode the original work data contained in the work upload request according to the set encoding rules to obtain the encoded work data, and send the encoded work data to the relay server.
[0087] The A subprocess 1 of the relay server forwards the encoded artwork data to the artwork database for storage. This is the process for uploading player artwork. It should be noted that the above example is for illustrative purposes only. In actual applications, the number of players on the game server, the number of game server subprocesses (Z), and the number of A subprocesses on the relay server will vary depending on the specific circumstances and are not limited here. Furthermore, in practical applications, the number of players on the Z subprocess of the game server can be variable and allocated in real-time based on actual access volume.
[0088] In an optional implementation, the artwork data may further include model data of the player's artwork. The method may also include the following steps:
[0089] S190. When a model retrieval request is received from the game client, the work data of the specified player's work corresponding to the model retrieval request is retrieved from the first local work cache space.
[0090] In this embodiment, the model acquisition request can be generated after the user clicks on the display image of a specified player's work on the work display interface. The specified player's work can be any player's work displayed on the work display interface.
[0091] S200: Return the model data of the specified player's work to the game client so that the game client can display the specified player's work on the work details page.
[0092] In this embodiment, after retrieving the work data of the specified player's work corresponding to the model acquisition request from the first local work cache space, the work data includes the model data of the specified player's work. The model data of the specified player's work can then be returned to the game client, so that the model of the specified player's work can be displayed on the work details page. On the work details page, the user can choose to download or like the specified player's work.
[0093] The above-described embodiments of game display methods are based on game servers and describe the implementation process of cross-server game display.
[0094] Based on the above, the following describes a game display method using a relay server as the execution entity. It should be noted that the basic principle and technical effects are the same as or similar to the game display method implementation method executed by the aforementioned game server. For the sake of brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments.
[0095] Please combine Figure 5This method for showcasing game content utilizes a relay server. Multiple game servers communicate with this relay server, which in turn communicates with a content database. The content database stores all content uploaded by players across all game servers. This method includes the following steps:
[0096] S330: Receive the first game acquisition request sent by the target game server every first preset period.
[0097] In this embodiment, the target game server can be any one of the multiple game servers connected to the relay server.
[0098] S340: Search the second local game cache space for game data of all player games that match the first game acquisition request, and return the game data package obtained by packaging all player game data to the target game server.
[0099] In this embodiment, the second local work cache space stores all work data that the relay server periodically retrieves from the work database.
[0100] Specifically, when the target game server receives a work browsing request from the game client, the target game server queries the first local work cache space to find the display images of all player works that match the work browsing request, and returns the display images of all player works to the game client so that the game client can display all display images on the work display interface.
[0101] This invention provides a method for displaying game content. A relay server receives a first content retrieval request from a target game server (which can be any one of multiple game servers) every first preset period. Then, it searches a second local content cache space for content data matching the first content retrieval request and returns a content data package containing all player content data to the target game server. When the target game server receives a content browsing request from a game client, it retrieves display images of all player content matching the browsing request from the first local content cache space and returns these images to the game client, allowing the client to display all images on the content display interface. By using a content database to store all content data uploaded by players across all game servers and periodically retrieving content data packages from the relay server, the method ensures that when a content browsing request is received, the corresponding display images can be promptly returned to the game client, enabling player content to be displayed across servers rather than being limited to local storage.
[0102] In an optional implementation, the method may further include:
[0103] S350: Receive the encoded data of the work to be uploaded from the target game server.
[0104] In this embodiment, the encoded work data is obtained by the target game server encoding the original work data of the work to be uploaded according to the set encoding rules. The original work data is obtained by the target game server from the work upload request sent by the game client.
[0105] S360. Send the encoded work data to the work database so that the work database stores the encoded work data.
[0106] In an optional implementation, please refer to Figure 5 Before step S320 above, the following may also be included:
[0107] S310. Send a second work retrieval request to the work database every second preset cycle.
[0108] The relay server will send a second work retrieval request to the work database every second preset period. This second work retrieval request can also be generated by the game server based on the set request rules. The set request rules for the relay server to request work data from the work database are similar to the set request rules for the game server to request work data from the relay server, and will not be repeated here. The two can be the same or different.
[0109] S320: Receive the work data of multiple player works returned by the work database based on the second work acquisition request, and save the work data of multiple player works to the second local work cache space.
[0110] In this embodiment, the second local work cache space can be used to cache all work data obtained by the relay server from the work database.
[0111] It is understandable that if the capacity of the second local work cache space is limited, the relay server will only execute the above steps S310 and S320 to periodically request work data from the work database if there is remaining space in the second local work cache space. It should be noted that the first preset period and the second preset period mentioned above can be the same or different. For example, both can be set to 1 minute or 2 minutes. This example is only for illustration and is not limited here.
[0112] Combination Figure 4This can be understood as follows: the A sub-process of the relay server periodically retrieves artwork data from the artwork database and caches it in a second local cache space. Then, the Z sub-processes of each game server periodically retrieve artwork data from the second local cache space of the relay server and cache it in a first local artwork cache space. This allows game clients to display player artwork uploaded by players from various game servers simply by sending an artwork browsing request to the corresponding game server, thus achieving cross-server display. In this way, for a game server, the pressure of uploading, browsing, and downloading artwork from various game clients is distributed among the various Z sub-processes of the Z main process.
[0113] Players generally have the following three needs when browsing works:
[0114] The first scenario involves sorting the works in descending order of download count.
[0115] The second scenario involves sorting the works in descending order based on the number of likes.
[0116] The third scenario involves sorting the works in descending order of their upload time.
[0117] Taking the example that game clients default to sorting works in descending order of upload time, and that the relay server also considers upload time when retrieving work data from the work database, combined with... Figure 4 The process by which the relay server retrieves data from the works database is as follows:
[0118] Child process A can start a timer through the cache manager (CacheMgr) to retrieve 100 works from the works database every second preset period (let's say 1 minute) and store them in the second local works cache space. The works cached in the second local works cache space can be managed by a class called BaseCache.
[0119] In the artwork database, each player's artwork data also includes an upload timestamp, which represents the upload time of that player's artwork. Therefore, each time subprocess A retrieves data from the artwork database, it can determine the latest upload timestamp in the second local artwork cache space, and then retrieve 100 artwork data entries from the artwork database that are newer than that latest upload timestamp.
[0120] For example, suppose the latest upload timestamp in the second local work cache is 1667532028, which is equivalent to the time: 2022-11-04 11:20:28. One minute later, CacheMgr retrieves 100 more works from the work database with upload timestamps greater than 1667532028. This process continues, with newly uploaded works from the work database being managed by BaseCache. Since this accumulation is continuous, let's assume the second local work cache can be capped at 1000 works. If it exceeds 1000, a queue-based first-in-first-out (FIFO) approach is used. BaseCache deletes the earliest cached works from the second local work cache. This process repeats, ensuring that the second local work cache always contains the 1000 most recently uploaded works from the work database. This is the first-level cache in the relay server.
[0121] For the game server, the Z child process can also periodically obtain the game data from the second local cache space and store it in the first local cache space through the cache manager (CacheMgr). This is the game server's second-level cache.
[0122] It's understandable that the above examples only illustrate the concept from the perspective of work upload time. However, to showcase the diversity of player works, all three scenarios can be configured, and the specific request rules for the game server and relay server can also be related to all three scenarios. Thus, the work data retrieved by the relay server from the work database might be redundant. An array of numbers can be used to manage the work numbers of all work data retrieved from the second local work cache space, ensuring that each work number in the array is unique. When the game server requests data, it can first determine all the work numbers to be requested from the array of numbers, and then retrieve the corresponding work data from the second local work cache space based on these work numbers.
[0123] It should be noted that the terms A main process, A child process, Z main process, and Z child process used in the above description are merely illustrative examples and not intended as limiting names. The execution order of each step in the above method embodiments is not limited to what is shown in the accompanying drawings; the execution order of each step depends on the actual application.
[0124] In order to perform the corresponding steps in the above method embodiments and various possible implementations, two implementation methods of game display devices are given below.
[0125] Please see Figure 6 , Figure 6A schematic diagram of the structure of a first game display device provided in an embodiment of the present invention is shown. This game display device 200 is applied to a game server, which is communicatively connected to a relay server. The relay server is also communicatively connected to a game database, which stores all game data uploaded by all players corresponding to all game servers.
[0126] The game display device 200 includes: a first request module 210, a first receiving module 220, and a first sending module 230.
[0127] The first request module 210 is used to send a first work acquisition request to the relay server every first preset period;
[0128] The first receiving module 220 is used to receive the work data packet returned by the relay server based on the first work acquisition request, and save the work data packet to the first local work cache space; the work data packet is obtained from the second local work cache space of the relay server; the work data packet includes work data of at least one player's work, and the work data includes the display image of the player's work;
[0129] When a work browsing request is received from a game client, the first receiving module 220 is also used to search for display images of all player works that match the work browsing request in the first local work cache space;
[0130] The first sending module 230 is used to return the display images of all players' works to the game client so that the game client can display all display images on the work display interface.
[0131] In an optional implementation, the first receiving module 220 is further configured to: when receiving a work upload request sent by the game client, determine whether the game client meets the work upload conditions; the work upload request includes the original work data of the work to be uploaded; if the conditions are met, encode the original work data according to a set encoding rule to obtain the encoded work data. The first sending module 230 is further configured to send the encoded work data to a relay server, so that the relay server sends the encoded work data to the work database for storage.
[0132] In an optional implementation, the artwork data also includes model data of the player's artwork; the first receiving module 220 is further configured to: when receiving a model retrieval request sent by the game client, retrieve the artwork data of the specified player's artwork corresponding to the model retrieval request from the first local artwork cache space; wherein, the model retrieval request is generated after the user clicks on the display image of the specified player's artwork on the artwork display interface. The first sending module 230 is further configured to return the model data of the specified player's artwork to the game client, so that the game client can display the specified player's artwork on the artwork details interface.
[0133] Please see Figure 7 , Figure 7 A schematic diagram of the structure of a second game artwork display device provided in an embodiment of the present invention is shown. This game artwork display device 400 is applied to a relay server, with multiple game servers communicating with it. The relay server is also communicating with an artwork database, which stores all artwork data uploaded by players corresponding to all game servers. The game artwork display device 400 includes:
[0134] The second receiving module 410 is used to receive a first work acquisition request sent by the target game server every first preset period, wherein the target game server is any one of multiple game servers;
[0135] The second receiving module 410 is also used to search for the work data of all player works that match the first work acquisition request in the second local work cache space, and return the work data package obtained by packaging the work data of all player works to the target game server;
[0136] Specifically, when the target game server receives a work browsing request from the game client, the target game server queries the first local work cache space to find the display images of all player works that match the work browsing request, and returns the display images of all player works to the game client so that the game client can display all display images on the work display interface.
[0137] In an optional implementation, the second receiving module 410 is further configured to receive encoded work data of the work to be uploaded sent by the target game server; wherein, the encoded work data is obtained by the target game server encoding the original work data of the work to be uploaded according to a set encoding rule; the original work data is obtained by the target game server from the work upload request sent by the game client.
[0138] The game display device 400 may also include a second sending module 420 for sending the encoded game data to the game database so that the game database stores the encoded game data.
[0139] In an optional implementation, the game display device 400 may further include a second request module 430. Before the second receiving module 410 receives the first game acquisition request sent by the target game server every first preset period, the second request module 430 sends a second game acquisition request to the game database every second preset period. The second receiving module 410 may also receive game data of multiple player games returned by the game database based on the second game acquisition request, and save the game data of multiple player games to a second local game cache space.
[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the game display device 200 or game display device 400 described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0141] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 300 includes a processor 310, a memory 320, and a bus 330, with the processor 310 connected to the memory 320 via the bus 330.
[0142] Memory 320 can be used to store software programs, for example, Figure 6 The game display device shown is 200 or Figure 7 The game display device 400 shown is included. The memory 320 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Flash Memory, Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc.
[0143] The processor 310 can be an integrated circuit chip with signal processing capabilities. The processor 310 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0144] The memory 320 stores machine-readable instructions executable by the processor 310. When the processor 310 executes the machine-readable instructions, it implements the game display method disclosed in the above embodiments.
[0145] It is understood that the electronic device 300 is the aforementioned game server or relay server, and Figure 8 The structure shown is for illustrative purposes only; the electronic device 300 may also include components that are more advanced than those shown. Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown. Figure 8 The components shown can be implemented using hardware, software, or a combination thereof.
[0146] This invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the game display method disclosed in the above embodiments. The readable storage medium can be, but is not limited to, various media capable of storing program code, such as a USB flash drive, external hard drive, ROM, RAM, PROM, EPROM, EEPROM, FLASH disk, or optical disk.
[0147] In summary, this invention provides a method, apparatus, electronic device, and readable storage medium for displaying game works. The game server periodically sends a first work retrieval request to a relay server, receives work data packets returned by the relay server based on the first work retrieval request, and saves them to a first local work cache space. When a work browsing request is received from a game client, the game server searches the first local work cache space for display images of all player works matching the browsing request. All display images are then returned to the game client so that the game client can display all display images on the work display interface. Thus, by using a work database to store all work data uploaded by all game players corresponding to all game servers, and periodically retrieving work data packets from the relay server, the game server can promptly return the corresponding display images to the game client upon receiving a work browsing request, enabling player works to be displayed across servers rather than being limited to local display.
[0148] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A game work presentation method characterized by comprising: The application is applied to a game server, which is in communication connection with a relay server, the relay server is also in communication connection with a work database and a plurality of other game servers, the work database stores all work data uploaded by game players corresponding to all the game servers; the method comprises: sending a first work acquisition request to the relay server every first preset period; receiving a work data packet returned by the relay server based on the first work acquisition request, and saving the work data packet to a first local work cache space; the work data packet is obtained from a second local work cache space of the relay server, work data in the second local work cache space is pre-stored after being acquired from the work database by the relay server in a timely manner; the work data packet comprises work data of at least one player work, and the work data comprises a display image of a player work; when a work browsing request sent by a game client is received, searching for display images of all player works meeting the work browsing request in the first local work cache space; returning the display images of all the player works to the game client, so that the game client displays all the display images on a work display interface.
2. The method of claim 1, wherein, The method further comprises: when a work uploading request sent by the game client is received, judging whether the game client meets work uploading conditions; the work uploading request comprises original work data of a work to be uploaded; if yes, encoding the original work data according to a set encoding rule to obtain encoded work data; sending the encoded work data to the relay server, so that the relay server sends the encoded work data to the work database for storage.
3. The method of claim 1, wherein, The work data further comprises model data of a player work; the method further comprises: when a model acquisition request sent by the game client is received, searching for work data of a specified player work corresponding to the model acquisition request from the first local work cache space; wherein the model acquisition request is generated after a user clicks a display image of the specified player work on the work display interface; returning model data of the specified player work to the game client, so that the game client displays the specified player work on a work detail interface.
4. A game work presentation method characterized by comprising: The application is applied to a relay server, a plurality of game servers are in communication connection with the relay server, the relay server is in communication connection with a work database, and the work database stores all work data uploaded by game players corresponding to all the game servers; the method comprises: receiving a first work acquisition request sent by a target game server every first preset period, the target game server being any one of the plurality of game servers; find work data of all player works meeting the first work acquisition request in a second local work cache space, and return a work data package obtained by packing the work data of all player works to the first local work cache space of the target game server; the work data in the second local work cache space is pre-stored by the transit server after being acquired from the work database at a regular time; wherein, when the target game server receives a work browsing request sent by a game client, the target game server queries display images of all player works meeting the work browsing request in the first local work cache space, and returns the display images of all player works to the game client, so that the game client displays all the display images on a work display interface.
5. The method of claim 4, wherein, The method further comprises: receiving encoded work data of a work to be uploaded sent by the target game server; wherein, the encoded work data is obtained by encoding original work data of the work to be uploaded according to a set encoding rule by the target game server; the original work data is obtained from a work upload request sent by a game client by the target game server; sending the encoded work data to the work database, so that the work database stores the encoded work data.
6. The method of claim 4, wherein, Before the step of receiving the first work acquisition request sent by the target game server at a first preset period, the method further comprises: sending a second work acquisition request to the work database at a second preset period; receiving work data of multiple player works returned by the work database based on the second work acquisition request, and saving the work data of multiple player works to a second local work cache space.
7. A game work presentation device characterized by comprising: The application is applied to a game server, the game server is in communication connection with a transit server, the transit server is further in communication connection with a work database and multiple other game servers, the work database stores all work data uploaded by game players corresponding to all the game servers; the device comprises: a first request module, configured to send a first work acquisition request to the transit server at a first preset period; a first receiving module, configured to receive a work data package returned by the transit server based on the first work acquisition request, and save the work data package to a first local work cache space; the work data package is obtained from a second local work cache space of the transit server, work data in the second local work cache space is pre-stored by the transit server after being acquired from the work database at a regular time; the work data package comprises work data of at least one player work, and the work data comprises a display image of a player work; when receiving a work browsing request sent by a game client, the first receiving module is further configured to find display images of all player works meeting the work browsing request in the first local work cache space; The first sending module is configured to return the display images of the works of all the players to the game client, so that the game client displays all the display images on a work display interface.
8. A game work presentation device characterized by comprising: The application is applied to a relay server, a plurality of game servers are in communication connection with the relay server, the relay server is in communication connection with a work database, the work database stores all work data uploaded by game players corresponding to the game servers; the device comprises: The second receiving module is configured to receive a first work acquisition request sent by a target game server at every first preset period, the target game server being any one of the plurality of game servers; The second receiving module is further configured to find work data of works of all the players that meet the first work acquisition request in a second local work cache space, and return a work data packet obtained by packing the work data of the works of all the players to a first local work cache space of the target game server; the work data in the second local work cache space is pre-stored after being acquired from the work database by the relay server at regular intervals; When the target game server receives a work browsing request sent by a game client, the target game server queries display images of works of all the players that meet the work browsing request from the first local work cache space, and returns the display images of the works of all the players to the game client, so that the game client displays all the display images on a work display interface.
9. An electronic device, comprising: The device comprises: A memory and a processor, the memory storing machine readable instructions executable by the processor, and the processor executing the machine readable instructions to implement the game work display method according to any one of claims 1-3 or 4-6 when the electronic device is running.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the game work display method according to any one of claims 1-3 or 4-6.
Citation Information
Patent Citations
System and method for synchronizing online game data
CN102469123A
Data sharing method, server and medium
CN110580257A