A cloud game mounting method, device, electronic device and storage medium
By isolating and storing game data and user data in the cloud and mounting it to read-only and read-write directories, the problems of insufficient local storage and user data strings are solved, and efficient game updates and data isolation are achieved.
Patent Information
- Application Number
- CN202211057193.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-08-31
AI Technical Summary
In the prior art, game deployment based on local file system results in insufficient storage, high update complexity, and insufficient isolation of user data, which is prone to user data strings.
Through the cloud game mount method, game data and user data are stored in different directories of the network file server, and are isolated to the read-only and read-write directories of the game service node, and merged into the joint mount directory to achieve data isolation and efficient updates.
Save local storage space, simplify the game update process, avoid user data strings, and ensure data isolation and access convenience.
Smart Images

Figure CN115414665B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a cloud game mounting method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] In related technologies, games are run based on a local file system, with each game's game data and user data stored on a game service node. When a large number of games are deployed, the node's local storage becomes insufficient to accommodate the remaining games. Each game update requires a synchronous update of all game service nodes where the game is installed, increasing the complexity and cost of game deployment. Furthermore, insufficient isolation of user data can easily lead to users accessing other users' information, a common practice that often results in user data strings.
[0003] Therefore, how to avoid the occurrence of strings in user data is a technical problem that those skilled in the art need to solve. Summary of the Invention
[0004] The purpose of this application is to provide a cloud game mounting method, device, electronic device and computer-readable storage medium to avoid the occurrence of string user data.
[0005] To achieve the above objectives, this application provides a cloud game mounting method, including:
[0006] Get the target game's mount parameters;
[0007] Acquire target mounting information of target data of the target game according to the mounting parameters; wherein the target data includes first type data and second type data;
[0008] Mounting a first network directory in the target network file server to a first local directory in the game service node according to the target mounting information, and mounting a second network directory in the target network file server to a second local directory in the game service node; wherein the first network directory is used to store a first type of data of the target data, and the first network directory and the first local directory are read-only directories, and the second network directory is used to store a second type of data of the target data, and the second network directory and the second local directory are read-write directories;
[0009] The first local directory and the second local directory are combined and mounted onto a joint mount directory according to the target mount information.
[0010] The mounting parameters include game parameters and user information, and the step of obtaining target mounting information of target data of the target game according to the mounting parameters includes:
[0011] Sending the game parameters and the user information to a game directory indexing service, so that the game directory indexing service determines a target network file server corresponding to the target game based on the game parameters and the user information, determines the first network directory and the second network directory in the target network file server based on configuration information of the target game, and returns an address of the target network file server, an address of the first network directory, and an address of the second network directory;
[0012] The first local directory, the second local directory, and the joint mount directory are determined in the game service node, and target mount information of the target data is constructed based on the address of the target network file server, the address of the first network directory, the address of the second network directory, the address of the first local directory, the address of the second local directory, and the address of the joint mount directory.
[0013] The game directory index service determines the target network file server corresponding to the target game according to the game parameters and the user information, including:
[0014] The game directory index service determines a candidate network file server corresponding to the target game based on the package name and version code in the game parameters;
[0015] The game directory index service selects a target network file server from the candidate network file servers using a consistency algorithm based on the user information.
[0016] The game directory index service determines the first network directory and the second network directory in the target network file server according to the configuration information of the target game, including:
[0017] The game directory index service determines whether there is configuration information corresponding to the target game based on the package name and version code in the game parameters; if so, the first network directory and the second network directory are determined in the target network file server based on the configuration information corresponding to the target game; if not, the first network directory and the second network directory are determined in the target network file server based on default configuration information.
[0018] The method of mounting, according to the target mounting information, a first network directory storing first type data of the target data in the target network file server to a first local directory storing the first type data of the target data in the game service node, and mounting a second network directory storing second type data of the target data in the target network file server to a second local directory storing the second type data of the target data in the game service node, comprises:
[0019] Mounting, in read-only mode according to the target mounting information, a first network directory storing the first type of data of the target data in the target network file server to a first local directory storing the first type of data of the target data in the game service node;
[0020] The second network directory storing the second type of data of the target data in the target network file server is mounted to the second local directory storing the second type of data of the target data in the game service node in a read-write mode according to the target mounting information.
[0021] After merging the first local directory and the second local directory and mounting them on a joint mount directory according to the target mount information, the method further includes:
[0022] Determine a target subdirectory in the joint mount directory, and determine a third local directory in the game service node;
[0023] Overlay mounting the third local target to the target subdirectory.
[0024] After merging the first local directory and the second local directory and mounting them on a joint mount directory according to the target mount information, the method further includes:
[0025] A target subdirectory is determined in the joint mount directory, and the virtual network directory in the standby network file server is mounted to the target subdirectory, so as to achieve data synchronization between the target subdirectory in the game service node and the virtual network directory in the standby network file server.
[0026] The first type of data is game-related data that is only allowed to be read by the user but not modified by the user, and the second type of data is user-related data that is allowed to be modified by the user.
[0027] Wherein, obtaining the mounting information of the target game according to the mounting parameters includes:
[0028] Acquire first mounting information of the game core file data, second mounting information of the game resource data, and third mounting information of the game storage card data of the target game according to the mounting parameters;
[0029] Accordingly, the game core file data, the game resource data and the game storage card data are used as the target data in sequence, and the first mount information, the second mount information and the third mount information are used as the target mount information in sequence, and the steps of mounting the first network directory in the target network file server to the first local directory in the game service node according to the target mount information, mounting the second network directory in the target network file server to the second local directory in the game service node, and merging the first local directory and the second local directory and mounting them on the joint mount directory according to the target mount information are performed.
[0030] To achieve the above objectives, the present application provides a cloud game mounting device, comprising:
[0031] The first acquisition module is used to obtain the mounting parameters of the target game;
[0032] A second acquisition module is configured to acquire target mounting information of target data of the target game according to the mounting parameters; wherein the target data includes first type data and second type data;
[0033] A first mounting module is configured to mount a first network directory in a target network file server to a first local directory in a game service node, and to mount a second network directory in a target network file server to a second local directory in the game service node according to the target mounting information; wherein the first network directory is configured to store a first type of data of the target data, and the first network directory and the first local directory are read-only directories; and the second network directory is configured to store a second type of data of the target data, and the second network directory and the second local directory are read-write directories;
[0034] The second mounting module is configured to mount the first local directory and the second local directory together onto a joint mounting directory according to the target mounting information.
[0035] To achieve the above objectives, the present application provides an electronic device, comprising:
[0036] Memory for storing computer programs;
[0037] A processor is used to implement the steps of the above-mentioned cloud game mounting method when executing the computer program.
[0038] To achieve the above-mentioned purpose, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned cloud game mounting method are implemented.
[0039] It can be seen from the above scheme that a cloud game mounting method provided by the present application includes: obtaining the mounting parameters of the target game; obtaining the target mounting information of the target data of the target game according to the mounting parameters; wherein the target data includes a first type of data and a second type of data; according to the target mounting information, the first network directory in the target network file server is mounted to the first local directory in the game service node, and the second network directory in the target network file server is mounted to the second local directory in the game service node; wherein, the first network directory is used to store the first type of data of the target data, the first network directory and the first local directory are read-only directories, and the second network directory is used to store the second type of data of the target data, and the second network directory and the second local directory are read-write directories; according to the target mounting information, the first local directory and the second local directory are merged and mounted to the joint mounting directory.
[0040] In this application, the game is deployed on a network file server, saving storage space on the local game service node. When updating the game, only the data on the network file server needs to be updated, and the game service node can complete the game update the next time the game is started. In addition, the first type of data and the second type of data in the target data are isolated in the network file server and stored in different network directories. When the game is mounted, they are mounted on different local directories. The first network directory and the first local directory storing the first type of data are read-only directories, and the second network directory and the second local directory storing the second type of data are read-write directories. In other words, this application implements data isolation between data that the user is allowed to modify and data that the user is not allowed to modify, avoiding the situation where data that the user is not allowed to write, that is, user-related data, appears to be a string. Furthermore, the different local directories of the target data are merged and mounted on a joint mount directory. For the user, the target data can be accessed through a single directory of the joint mount directory.
[0041] This application also discloses a cloud game mounting device, an electronic device and a computer-readable storage medium, which can also achieve the above-mentioned technical effects.
[0042] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings are used to provide a further understanding of the present disclosure and constitute part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure, but do not constitute a limitation of the present disclosure. In the drawings:
[0044] Figure 1 This is a flow chart of a cloud game mounting method according to an exemplary embodiment;
[0045] Figure 2 This is a flow chart of a cloud game running method according to an exemplary embodiment;
[0046] Figure 3 This is a flow chart of another cloud game mounting method according to an exemplary embodiment;
[0047] Figure 4 This is a structural diagram of a cloud game mounting device according to an exemplary embodiment;
[0048] Figure 5 The figure is a structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0050] An embodiment of the present application discloses a cloud game mounting method, which avoids the occurrence of string user data.
[0051] See also Figure 1 and Figure 2 , Figure 1 This is a flow chart of a cloud game mounting method according to an exemplary embodiment. Figure 2 FIG. 1 is a flow chart of a cloud game operation method according to an exemplary embodiment. Figure 1 Shown, including:
[0052] S101: Obtain the target game's mounting parameters;
[0053] The execution entity of this embodiment is a local game service node. The client sends a start request for the target game to the game service node to start mounting the target game. The game service node can obtain the mounting parameters of the target game in the start request. The mounting parameters may include game parameters and user information. The game parameters may include the package name (packageName) and version number (versionCode) of the target game to determine the uniqueness of the target game. The user information is used to determine the user who starts the game.
[0054] S102: Acquire target mounting information of target data of the target game according to the mounting parameters; wherein the target data includes first type data and second type data;
[0055] In a specific implementation, the game service node obtains target mount information for the target data of the target game based on the target game's mount parameters. The target data may specifically include game core file data, game resource data, game storage card data, etc. Of course, depending on the different configurations of the game, it may also be other data, which is not specifically limited in this embodiment. For each target data, the subsequent steps S103-S104 are executed in sequence to complete the mounting of each target data.
[0056] The target data may include first-type data and second-type data. The first-type data is game-related data that the user is only allowed to read but not to modify during the client running the target game. The second-type data is user-related data that the user is allowed to modify during the client running the target game.
[0057] The target mount information may include a first network directory storing first type data in the target network file server, a second network directory storing second type data, a first local directory storing first type data in the game server node, a second local directory storing second type data, and a joint mount directory of the target data in the game server node.
[0058] As a feasible implementation method, this step may include: sending the game parameters and the user information to a game directory index service, so that the game directory index service determines the target network file server corresponding to the target game based on the game parameters and the user information, determines the first network directory and the second network directory in the target network file server according to the configuration information of the target game, and returns the address of the target network file server, the address of the first network directory, and the address of the second network directory; determines the first local directory, the second local directory, and the joint mount directory in the game service node, and constructs the target mount information of the target data based on the address of the target network file server, the address of the first network directory, the address of the second network directory, the address of the first local directory, the address of the second local directory, and the address of the joint mount directory.
[0059] In a specific implementation, the game service node sends the game parameters and user information obtained from the client to the game directory indexing service. The game directory indexing service first determines the candidate network file servers corresponding to the target game based on the package name and version code in the game parameters. Then, based on the user information, it uses a consistency algorithm to select a target network file server from the candidate network file servers. This target network file server stores the target data for the target game. Then, based on the package name and version code in the game parameters, it determines a first network directory for storing the first type of data and a second network directory for storing the second type of data on the target network file server. Finally, it returns the address of the target network file server, the address of the first network directory, and the address of the second network directory to the game service node.
[0060] In one feasible embodiment, the game directory indexing service determines the first and second network directories on the target network file server based on the target game's configuration information. This includes: the game directory indexing service determines whether the configuration information corresponding to the target game exists based on the package name and version code in the game parameters; if so, determines the first and second network directories on the target network file server based on the configuration information corresponding to the target game; if not, determines the first and second network directories on the target network file server based on default configuration information. In a specific implementation, the game directory indexing service determines the corresponding configuration information based on the package name and version code in the game parameters; if no corresponding configuration information exists, the default configuration information is used. When the target game is first mounted, the game directory indexing service sends a command to the target network file server. The target network file server creates the first and second network directories based on the target game's configuration information or the default configuration information, and returns the addresses of the first and second network directories to the game directory indexing service. During subsequent mounts, the target network file server may directly return the addresses of the created first and second network directories based on the target game's configuration information or the default configuration information.
[0061] After receiving the address of the target network file server, the address of the first network directory, and the address of the second network directory, the game service node locally determines a first local directory for storing the first type of data, a second local directory for storing the second type of data, and a joint mount directory, thereby constructing the target mount information. The game service node determines the corresponding configuration information based on the package name and version code in the game parameters. If the corresponding configuration information does not exist, the default configuration information is used. When the target game is mounted for the first time, the game service node creates the first local directory, the second local directory, and the joint mount directory based on the target game's corresponding configuration information or the default configuration information. During subsequent mounts, the addresses of the created first local directory and second local directory can be directly determined based on the target game's configuration information or the default configuration information.
[0062] Furthermore, the first network directory and the first local directory used to store the first type of data are set as read-only directories to ensure that the first type of data is not modified, and the second network directory and the second local directory used to store the second type of data are set as read-write directories so that users can modify the second type of data.
[0063] For example, the target mount information may be specifically: ocfs: / / user_data?union=mode777,ro: / data / tmp@10.6.1.1(26211)| / data / ocfs / data,rw: / data / user_data@10.6.1.1(26211)| / data / ocfs / client_data,done_clear,rm_old&symlinks=database: / data / ocfs / private_data / database&mp= / mnt / data_data. Among them, "ocfs: / / " is the protocol header, user_data indicates the game data directory, union indicates the start of the joint mount, mode777 is used for the permissions after the directory is mounted, ro indicates the readable layer, and the source and target directories mounted by | are separated, that is, / data / tmp@10.6.1.1(26211) indicates the first network directory, / data / ocfs / data indicates the first local directory, rw indicates the writable layer, and the source and target directories mounted by | are separated, that is, / data / user_data@10.6.1.1(26211 ) indicates the second network directory, / data / ocfs / client_data indicates the second local directory, done_clear indicates that the joint mount directory will be automatically cleaned up after exiting the mount, rm_old indicates that the joint mount directory will be cleaned up before mounting to prevent the directory from being occupied by other services and causing the mount to fail, mp indicates that the ro layer and rw layer will eventually be jointly mounted to the joint mount directory / mnt / data_data, symlinks is used to overwrite the subdirectories in the joint mount directory with other directories, and is mainly used to isolate and bind game user information and other game information of users.
[0064] S103: Mounting a first network directory in the target network file server to a first local directory in the game service node according to the target mounting information, and mounting a second network directory in the target network file server to a second local directory in the game service node; wherein the first network directory is used to store a first type of data of the target data, and the first network directory and the first local directory are read-only directories, and the second network directory is used to store a second type of data of the target data, and the second network directory and the second local directory are read-write directories;
[0065] In this embodiment, the first and second types of data in the target data are isolated on the target network file server and stored in a first network directory and a second network directory, respectively. When the game is mounted, the game directory system service uses the FUSE mode (Filesystem in Userspace) to mount the first network directory onto the first local directory and the second network directory onto the second local directory, thus also achieving isolation between the first and second types of data locally. It should be noted that the game directory system service can run on a game service node or other device, and this embodiment does not specifically limit this.
[0066] As a preferred embodiment, this step includes: mounting, in read-only mode, a first network directory storing a first type of target data on a target network file server to a first local directory storing the first type of target data on a game service node based on the target mount information; and mounting, in read-write mode, a second network directory storing a second type of target data on a target network file server to a second local directory storing the second type of target data on a game service node based on the target mount information. In a specific implementation, the game service node mounts the first network directory to the first local directory in read-only mode and mounts the second network directory to the second local directory in read-write mode.
[0067] It's understandable that, because it's unknown which data is the first type and which is the second type during the initial mount, two local directories are created: one read-only and the other read-write. During the initial mount, only the read-only local directory, the first local directory, contains content, while the read-write local directory, the second local directory, is actually empty. After the game is launched, all newly written files are written to the second local directory. This ensures that user-written data is stored separately, even though it's unknown which data is user-readable and user-writable.
[0068] S104: Mount the first local directory and the second local directory together on a joint mount directory according to the target mount information.
[0069] In this step, the game directory system service uses FUSE mode to merge the first and second local directories and mount them onto the joint mount directory. The game directory system service performs a series of mount operations to create the directory required by the game service node and returns the mount status. It then waits for a release signal. Upon receiving the mount status, the game service node starts the game and enters push streaming mode. Upon receiving the pull signal, the client begins pulling the stream for display.
[0070] It should be noted that since some systems (such as the Android system) have restrictions on the directories used by game applications, specific directories must be accessed, that is, all files must be mounted under a specific directory. However, if all game files are directly mounted under the same directory, users may access other users' information. Therefore, this embodiment isolates the first type of data and the second type of data, mounts them to the first local directory and the second local directory respectively, and then merges the first local directory and the second local directory and mounts them into a joint mount directory, so that when the game itself accesses the joint mount directory, it can see all files under the first local directory and the second local directory, which not only meets the system's directory restrictions but also avoids the occurrence of string user data.
[0071] For example, if you mount 10.6.1.1: / data / tmp in read-only mode on the local / data / ocfs / data directory, reading the contents of the local / data / ocfs / data directory is equivalent to reading / data / tmp on the target network file server (10.6.1.1). Then, if you mount 10.6.1.1: / data / user_data in read-write mode on the local / data / ocfs / client_data directory, and then merge / data / ocfs / data and / data / ocfs / client_data and mount them on the / mnt / data_data directory, if file a exists in the / data / ocfs / data directory but not in / data / ocfs / client_data, file a can be read from / mnt / data_data, and write operations on file a will write the contents to / data / ocfs / client_data / a. If file b exists in both / data / ocfs / data / and / data / ocfs / client_data / , file b can be read in / mnt / data_data and contains the contents of / data / ocfs / client_data / b.
[0072] Based on this embodiment, as a preferred implementation, after merging the first local directory and the second local directory and mounting them onto a joint mount directory according to the target mount information, the method further includes: determining a target subdirectory in the joint mount directory, determining a third local directory in the game service node; and overwriting and mounting the third local target onto the target subdirectory.
[0073] It is understandable that during the game operation, the target subdirectory in the joint mount directory will be locked, which will prevent different users from running a game at the same time. To avoid this situation, the system function (mount) can be called to overwrite the third local directory and mount it to the target subdirectory, that is, the target subdirectory will not be directly exposed to the user, and the target subdirectory will not be locked, which can serve different users, allowing different users to run a game at the same time. For example, the target subdirectory is database, and the third local directory is / data / ocfs / private_data / database. / data / ocfs / private_data / database is mounted on database, and the content in / data / ocfs / private_data / database is synchronized to the directory where user information is stored at regular intervals, thereby binding the game account information to the user who starts the cloud game. For example, the storage directory of user information in the target network file server is 10.6.1.1: / data / user / {uid} / {packageName}, where {uid} represents the user ID parameter for launching the game, and {packageName} represents the package name parameter for launching the game. The storage directory of user information in the local game service node is / data / ocfs / local_branch / 10.6.1.1_data_user_{uid}_{pcakageName}, that is, 10.6.1.1: / data / user / {uid} / {packageName} is mounted to / data / ocfs / local_branch / 10.6.1.1_data_user_{uid}_{pcakageName}, and the directory content of / data / ocfs / private_data / database is periodically synchronized to / data / ocfs / local_branch / 10.6.1.1_data_user_{uid}_{pcakageName} / database.
[0074] As another preferred embodiment, after merging the first local directory and the second local directory and mounting them onto the joint mount directory according to the target mount information, the method further includes: determining a target subdirectory in the joint mount directory, and mounting the virtual network directory in the backup network file server to the target subdirectory, so as to achieve data synchronization between the target subdirectory in the game service node and the virtual network directory in the backup network file server.
[0075] In a specific implementation, some important user data can be backed up in a redundant manner. Specifically, a target subdirectory in a joint mount directory (typically a directory in the read-write layer) is mounted to the target subdirectory by mounting a virtual network directory on a backup network file server. This allows data written by users to the target subdirectory to be synchronized to the virtual network directory on the backup network file server. The backup network file server can be the target network file server or another network file server, and is not specifically limited here.
[0076] In an embodiment of the present application, the game is deployed on a network file server, saving storage space on the local game service node. When updating the game, only the data on the network file server needs to be updated, and the game service node can complete the game update the next time the game is started. In addition, the first type of data and the second type of data in the target data are isolated on the network file server and stored in different network directories. When the game is mounted, they are mounted on different local directories. The first network directory and the first local directory storing the first type of data are read-only directories, and the second network directory and the second local directory storing the second type of data are read-write directories. In other words, the present application implements data isolation between data that the user is allowed to modify and data that the user is not allowed to modify, avoiding the situation where data that the user is not allowed to write, that is, user-related data, appears to be a string. Furthermore, the different local directories of the target data are merged and mounted on a joint mount directory. For users, the target data can be accessed through a single directory of the joint mount directory.
[0077] The embodiment of this application discloses a cloud game mounting method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:
[0078] See also Figure 3 , according to an exemplary embodiment, a flow chart of another cloud game mounting method is shown, as shown in FIG. Figure 3 As shown, including:
[0079] S201: Obtain the target game's mounting parameters;
[0080] S202: Acquire first mounting information of the game core file data, second mounting information of the game resource data, and third mounting information of the game storage card data of the target game according to the mounting parameters;
[0081] In the present embodiment, obtain respectively the first mount information of game core file data, the second mount information of game resource data and the 3rd mount information of game memory card data, memory card can be specifically a game SD card (Secure Digital Memory Card). Game core file data, game resource data and game memory card data can only comprise first type data or second type data, also comprise first type data and second type data simultaneously, do not specifically limit at this. The first mount information comprises the first network directory of the first type data of storage game core file data in target network file server, the second network directory of the second type data of storage game core file data, the first local directory of the first type data of storage game core file data of game server node, the second local directory of the second type data of storage game core file data and the joint mount directory of game core file data in game server node. The second mount information comprises the first network directory of the first type data of storage game resource data in target network file server, the second network directory of the second type data of storage game resource data, the first local directory of the first type data of storage game resource data of game server node, the second local directory of the second type data of storage game resource data and the joint mount directory of game resource data in game server node. The third mounting information includes a first network directory storing first type data of the game memory card data in the target network file server, a second network directory storing second type data of the game memory card data, a first local directory storing first type data of the game memory card data in the game server node, a second local directory storing second type data of the game memory card data, and a joint mounting directory of the game memory card data in the game server node.
[0082] In this embodiment, the game core file data, game resource data, and game storage card data are sequentially used as target data, and the first mount information, the second mount information, and the third mount information are sequentially used as target mount information. The following steps are performed: mounting the first network directory storing the first type of target data in the target network file server to the first local directory storing the first type of target data in the game service node according to the target mount information; mounting the second network directory storing the second type of target data in the target network file server to the second local directory storing the second type of target data in the game service node; and merging the first local directory and the second local directory to a joint mount directory according to the target mount information. The specific mounting process can be referred to in the previous embodiment and will not be repeated here.
[0083] S203: Mounting, according to the first mounting information, a first network directory storing first-type data of the game core file data in the target network file server to a first local directory storing first-type data of the game core file data in the game service node, and mounting a second network directory storing second-type data of the game core file data in the target network file server to a second local directory storing second-type data of the game core file data in the game service node;
[0084] S204: Mounting, according to the first mounting information, a first local directory storing first type data of the game core file data and a second local directory storing second type data of the game core file data together to a joint mounting directory storing the game core file data;
[0085] S205: Mounting, according to the second mounting information, a first network directory storing the first type of data of the game resource data in the target network file server to a first local directory storing the first type of data of the game resource data in the game service node, and mounting a second network directory storing the second type of data of the game resource data in the target network file server to a second local directory storing the second type of data of the game resource data in the game service node;
[0086] S206: Mounting, according to the second mounting information, a first local directory storing the first type of game resource data and a second local directory storing the second type of game resource data onto a joint mounting directory storing the game resource data;
[0087] S207: Mounting the first network directory storing the first type of data of the game storage card data in the target network file server to the first local directory storing the first type of data of the game storage card data in the game service node according to the third mounting information, and mounting the second network directory storing the second type of data of the game storage card data in the target network file server to the second local directory storing the second type of data of the game storage card data in the game service node;
[0088] S208: According to the third mount information, the first local directory storing the first type of data of the game storage card data and the second local directory storing the second type of data of the game storage card data are merged and mounted onto the joint mount directory storing the game storage card data.
[0089] It should be noted that, as a feasible implementation, this embodiment can obtain the first mount information of the target game's game core file data, the second mount information of the game resource data, and the third mount information of the game storage card data at one time, and then execute steps S203-S208 in sequence. As another feasible implementation, the first mount information of the target game's game core file data can be obtained first, and steps S203-S204 can be executed. Then, the second mount information of the target game's game resource data can be obtained, and steps S205-S206 can be executed. Finally, the third mount information of the target game's game storage card data can be obtained, and steps S207-S208 can be executed.
[0090] The following is an introduction to a cloud game mounting device provided in an embodiment of the present application. The cloud game mounting device described below and the cloud game mounting method described above can be referenced to each other.
[0091] See also Figure 4 , according to a structural diagram of a cloud game mounting device shown in an exemplary embodiment, as shown Figure 4 As shown, including:
[0092] The first acquisition module 100 is used to obtain the mounting parameters of the target game;
[0093] A second acquisition module 200 is configured to acquire target mounting information of target data of the target game according to the mounting parameters; wherein the target data includes first type data and second type data;
[0094] A first mounting module 300 is configured to mount a first network directory in a target network file server to a first local directory in a game service node, and to mount a second network directory in a target network file server to a second local directory in the game service node according to the target mounting information; wherein the first network directory is configured to store a first type of target data, and the first network directory and the first local directory are read-only directories; and the second network directory is configured to store a second type of target data, and the second network directory and the second local directory are read-write directories;
[0095] The second mounting module 400 is configured to mount the first local directory and the second local directory together onto a joint mounting directory according to the target mounting information.
[0096] In an embodiment of the present application, the game is deployed on a network file server, saving storage space on the local game service node. When updating the game, only the data on the network file server needs to be updated, and the game service node can complete the game update the next time the game is started. In addition, the first type of data and the second type of data in the target data are isolated on the network file server and stored in different network directories. When the game is mounted, they are mounted on different local directories. The first network directory and the first local directory storing the first type of data are read-only directories, and the second network directory and the second local directory storing the second type of data are read-write directories. In other words, the present application implements data isolation between data that the user is allowed to modify and data that the user is not allowed to modify, avoiding the situation where data that the user is not allowed to write, that is, user-related data, appears to be a string. Furthermore, the different local directories of the target data are merged and mounted on a joint mount directory. For users, the target data can be accessed through a single directory of the joint mount directory.
[0097] Based on the above embodiment, as a preferred implementation, the mounting parameters include game parameters and user information, and the second acquisition module 200 includes:
[0098] a sending unit, configured to send the game parameters and the user information to a game directory indexing service, so that the game directory indexing service determines a target network file server corresponding to the target game based on the game parameters and the user information, determines the first network directory and the second network directory in the target network file server based on configuration information of the target game, and returns an address of the target network file server, an address of the first network directory, and an address of the second network directory;
[0099] A construction unit is configured to determine, in the game service node, the first local directory, the second local directory, and the joint mount directory, and construct target mount information of the target data based on the address of the target network file server, the address of the first network directory, the address of the second network directory, the address of the first local directory, the address of the second local directory, and the address of the joint mount directory.
[0100] Based on the above embodiment, as a preferred implementation method, the game directory index service determines the candidate network file server corresponding to the target game according to the package name and version code in the game parameters; the game directory index service selects the target network file server from the candidate network file servers based on the user information using a consistency algorithm.
[0101] Based on the above embodiment, as a preferred implementation mode, the game directory index service determines whether there is configuration information corresponding to the target game based on the package name and version code in the game parameters; if so, the first network directory and the second network directory are determined in the target network file server based on the configuration information corresponding to the target game; if not, the first network directory and the second network directory are determined in the target network file server based on default configuration information.
[0102] Based on the above embodiment, as a preferred implementation, the first mounting module 300 includes:
[0103] A first mounting unit is configured to mount, in read-only mode according to the target mounting information, a first network directory storing first type data of the target data in the target network file server to a first local directory storing first type data of the target data in the game service node;
[0104] The second mounting unit is used to mount the second network directory storing the second type of data of the target data in the target network file server to the second local directory storing the second type of data of the target data in the game service node in a read-write mode according to the target mounting information.
[0105] Based on the above embodiment, as a preferred implementation, it further includes:
[0106] A determination module, configured to determine a target subdirectory in the joint mount directory and determine a third local directory in the game service node;
[0107] The third mounting module is used to mount the third local target to the target subdirectory.
[0108] Based on the above embodiment, as a preferred implementation, it further includes:
[0109] The fourth mounting module is used to determine a target subdirectory in the joint mounting directory and mount the virtual network directory in the backup network file server to the target subdirectory, so as to achieve data synchronization between the target subdirectory in the game service node and the virtual network directory in the backup network file server.
[0110] Based on the above embodiment, as a preferred implementation, the first type of data is game-related data that the user is only allowed to read but not to modify, and the second type of data is user-related data that the user is allowed to modify.
[0111] Based on the above embodiment, as a preferred implementation, the second acquisition module 200 is specifically configured to: acquire first mounting information of the game core file data, second mounting information of the game resource data, and third mounting information of the game storage card data of the target game according to the mounting parameters;
[0112] Correspondingly, the game core file data, the game resource data and the game storage card data are used as the target data in sequence, and the first mounting information, the second mounting information and the third mounting information are used as the target mounting information in sequence to start the workflow of the first mounting module 300 and the second mounting module 400.
[0113] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0114] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application further provides an electronic device, Figure 5 FIG. 1 is a structural diagram of an electronic device according to an exemplary embodiment. Figure 5 As shown, the electronic equipment includes:
[0115] Communication interface 1, capable of exchanging information with other devices such as network devices;
[0116] The processor 2 is connected to the communication interface 1 to implement information exchange with other devices and is used to execute the cloud game mounting method provided by one or more of the above technical solutions when running a computer program. The computer program is stored in the memory 3.
[0117] Of course, in actual application, the various components in the electronic device are coupled together through the bus system 4. It can be understood that the bus system 4 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 4.
[0118] The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.
[0119] It is understood that the memory 3 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a magnetic disk memory or a magnetic tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 3 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.
[0120] The method disclosed in the above-mentioned embodiment of the present application can be applied to processor 2 or implemented by processor 2. Processor 2 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above-mentioned method can be completed by the integrated logic circuit of the hardware in processor 2 or instructions in the form of software. The above-mentioned processor 2 can be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 2 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in memory 3. Processor 2 reads the program in memory 3 and completes the steps of the above-mentioned method in combination with its hardware.
[0121] When the processor 2 executes the program, the corresponding processes in the various methods of the embodiments of the present application are implemented. For the sake of brevity, they are not repeated here.
[0122] In an exemplary embodiment, the present application also provides a storage medium, namely, a computer storage medium, specifically a computer-readable storage medium, such as a memory 3 storing a computer program. The computer program can be executed by a processor 2 to perform the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.
[0123] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, ROM, RAM, disks or optical disks, etc. Various media that can store program codes.
[0124] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0125] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A cloud game mounting method, characterized in that: include: Get the mount parameters of the target game; Acquire target mounting information of target data of the target game according to the mounting parameters; wherein the target data includes first type data and second type data; Mounting a first network directory in the target network file server to a first local directory in the game service node according to the target mounting information, and mounting a second network directory in the target network file server to a second local directory in the game service node; wherein the first network directory is used to store a first type of data of the target data, and the first network directory and the first local directory are read-only directories, and the second network directory is used to store a second type of data of the target data, and the second network directory and the second local directory are read-write directories; Mounting the first local directory and the second local directory together on a joint mount directory according to the target mount information; The mounting parameters include game parameters and user information, and the step of obtaining target mounting information of target data of the target game according to the mounting parameters includes: Sending the game parameters and the user information to a game directory indexing service, so that the game directory indexing service determines a target network file server corresponding to the target game based on the game parameters and the user information, determines the first network directory and the second network directory in the target network file server based on configuration information of the target game, and returns an address of the target network file server, an address of the first network directory, and an address of the second network directory; The first local directory, the second local directory, and the joint mount directory are determined in the game service node, and target mount information of the target data is constructed based on the address of the target network file server, the address of the first network directory, the address of the second network directory, the address of the first local directory, the address of the second local directory, and the address of the joint mount directory.
2. The cloud game mounting method according to claim 1, characterized in that: The game directory index service determines the target network file server corresponding to the target game according to the game parameters and the user information, including: The game directory index service determines a candidate network file server corresponding to the target game based on the package name and version code in the game parameters; The game directory index service selects a target network file server from the candidate network file servers using a consistency algorithm based on the user information.
3. The cloud game mounting method according to claim 1, characterized in that: The game directory indexing service determines the first network directory and the second network directory in the target network file server according to configuration information of the target game, including: The game directory index service determines whether there is configuration information corresponding to the target game based on the package name and version code in the game parameters; if so, the first network directory and the second network directory are determined in the target network file server based on the configuration information corresponding to the target game; if not, the first network directory and the second network directory are determined in the target network file server based on default configuration information.
4. The cloud game mounting method according to claim 1, characterized in that: The method includes mounting, according to the target mounting information, a first network directory storing first type data of the target data in the target network file server to a first local directory storing the first type data of the target data in the game service node, and mounting a second network directory storing second type data of the target data in the target network file server to a second local directory storing the second type data of the target data in the game service node, including: Mounting, in read-only mode according to the target mounting information, a first network directory storing the first type of data of the target data in the target network file server to a first local directory storing the first type of data of the target data in the game service node; The second network directory storing the second type of data of the target data in the target network file server is mounted to the second local directory storing the second type of data of the target data in the game service node in a read-write mode according to the target mounting information.
5. The cloud game mounting method according to claim 1, characterized in that: After merging the first local directory and the second local directory and mounting them onto the joint mount directory according to the target mount information, the method further includes: Determine a target subdirectory in the joint mount directory, and determine a third local directory in the game service node; Overlay mounting the third local target to the target subdirectory.
6. The cloud game mounting method according to claim 1, characterized in that: After merging the first local directory and the second local directory and mounting them onto the joint mount directory according to the target mount information, the method further includes: A target subdirectory is determined in the joint mount directory, and the virtual network directory in the standby network file server is mounted to the target subdirectory, so as to achieve data synchronization between the target subdirectory in the game service node and the virtual network directory in the standby network file server.
7. The cloud game mounting method according to claim 1, characterized in that: The first type of data is game-related data that is only allowed to be read by the user but not modified by the user, and the second type of data is user-related data that is allowed to be modified by the user.
8. The cloud game mounting method according to any one of claims 1 to 7, characterized in that: The obtaining the mounting information of the target game according to the mounting parameters includes: Acquire first mounting information of the game core file data, second mounting information of the game resource data, and third mounting information of the game storage card data of the target game according to the mounting parameters; Accordingly, the game core file data, the game resource data and the game storage card data are used as the target data in sequence, and the first mount information, the second mount information and the third mount information are used as the target mount information in sequence, and the steps of mounting the first network directory in the target network file server to the first local directory in the game service node according to the target mount information, mounting the second network directory in the target network file server to the second local directory in the game service node, and merging the first local directory and the second local directory and mounting them on the joint mount directory according to the target mount information are performed.
9. A cloud game mounting device, characterized in that: include: The first acquisition module is used to obtain the mounting parameters of the target game; A second acquisition module is configured to acquire target mounting information of target data of the target game according to the mounting parameters; wherein the target data includes first type data and second type data; A first mounting module is configured to mount a first network directory in a target network file server to a first local directory in a game service node, and to mount a second network directory in a target network file server to a second local directory in the game service node according to the target mounting information; wherein the first network directory is configured to store a first type of data of the target data, and the first network directory and the first local directory are read-only directories; and the second network directory is configured to store a second type of data of the target data, and the second network directory and the second local directory are read-write directories; A second mounting module, configured to mount the first local directory and the second local directory together onto a joint mounting directory according to the target mounting information; The mounting parameters include game parameters and user information, and the second acquisition module includes: a sending unit, configured to send the game parameters and the user information to a game directory indexing service, so that the game directory indexing service determines a target network file server corresponding to the target game based on the game parameters and the user information, determines the first network directory and the second network directory in the target network file server based on configuration information of the target game, and returns an address of the target network file server, an address of the first network directory, and an address of the second network directory; A construction unit is configured to determine, in the game service node, the first local directory, the second local directory, and the joint mount directory, and construct target mount information of the target data based on the address of the target network file server, the address of the first network directory, the address of the second network directory, the address of the first local directory, the address of the second local directory, and the address of the joint mount directory.
10. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the cloud game mounting method as described in any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the cloud game mounting method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Operating system snapshot implementation method based on Overlay file system
CN107590272A
Cloud game account login method and device, computer equipment and storage medium
CN114095533A