Data processing method and related device
By separating the data packets of mini-games into engine files and other files, two independent data packets are generated and selectively downloaded based on the client's engine files. This solves the problem of long startup times for mini-games and improves user experience and data transmission efficiency.
Patent Information
- Application Number
- PCT/CN2024/082074
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-17
- Filing Date
- 2024-03-17
- Publication Date
- 2024-09-26
AI Technical Summary
The initial data packet size of the mini-game directly affects the startup time, resulting in a limited user experience.
By separating the game data package into engine files and other files, two independent data packages are generated and selectively downloaded based on the client's engine file conditions, reducing the size of the data package and download bandwidth.
Effectively reduces game startup time, saves data transmission bandwidth, and improves user experience.
Smart Images

Figure CN2024082074_26092024_PF_FP
Abstract
Description
Data processing method and related equipment
[0001] This application claims priority to the Chinese invention patent application with application number 202310274419.5 filed on March 17, 2023, entitled “Data processing methods and related equipment”. The entire contents of the Chinese patent application are incorporated into this application by reference. Technical Field
[0002] The present disclosure relates to the field of Internet technology, and in particular to a data processing method and related equipment. Background Art
[0003] This section is intended to provide a background or context to the embodiments of the present disclosure that are recited in the claims. No statement herein is admitted to be prior art by virtue of its inclusion in this section.
[0004] Typically, when a user launches a mini-game on a client, the client needs to download the mini-game's initial data package. After the initial data package is loaded and rendered, the user can enter the mini-game interface. Therefore, the size of the initial data package directly affects the time it takes to launch the mini-game. A long launch time can significantly impact the user experience.
[0005] Summary of the Invention
[0006] In view of this, the present disclosure proposes a data processing method and related devices.
[0007] The data processing method described in the embodiment of the present disclosure may include: determining the engine file in the game data packet; generating a first data packet based on other files in the game data packet except the engine file; generating a second data packet based on the engine file in the game data packet; and sending the storage address of the first data packet and the summary information of the second data packet to the client in response to a client request instruction.
[0008] In an embodiment of the present disclosure, the above method further includes: sending the storage address of the second data packet to the client in response to a client request instruction.
[0009] In an embodiment of the present disclosure, the above-mentioned determination of the engine file in the game data packet includes: receiving the game data packet; matching the files in the game data packet with preset files; and using the files in the game data packet that match the preset files as the engine files.
[0010] In an embodiment of the present disclosure, the above method further includes: scanning multiple game data packets; determining an engine file from the files contained in the multiple game data packets based on the identifiers of the files contained in the multiple game data packets and the number of times each file is referenced; and recording the determined engine file into the preset file.
[0011] In an embodiment of the present disclosure, the above-mentioned generation of the first data packet based on other files in the data packet of the game except the engine file includes: separating the engine file from the game data packet; and compiling and packaging the remaining files in the game data packet to obtain the first data packet.
[0012] In an embodiment of the present disclosure, generating the second data packet based on the engine file includes: compiling and packaging the separated engine file to obtain the second data packet; and determining summary information of the second data packet.
[0013] In an embodiment of the present disclosure, the above method further includes: compiling and packaging the files in the game data packet to obtain a third data packet; and feeding back the storage address of the third data packet to the client in response to the request instruction.
[0014] The data processing methods described in other embodiments of the present disclosure may include: in response to detecting a user's operation of starting a game for the first time, sending a request instruction to a server; receiving the storage address of a first data packet and summary information of a second data packet issued by the server; determining whether the second data packet has been stored locally based on the summary information of the second data packet; in response to determining that the second data packet has been stored locally, downloading the first data packet based on the storage address of the first data packet, and loading the downloaded first data packet and the second data packet stored locally.
[0015] In an embodiment of the present disclosure, the above method further includes: receiving the storage address of the second data packet sent by the server; in response to determining that the second data packet is not stored locally, downloading the first data packet based on the storage address of the first data packet, downloading the second data packet based on the storage address of the second data packet, and loading the downloaded first data packet and second data packet.
[0016] In an embodiment of the present disclosure, the above-mentioned determining whether the second data packet has been stored locally based on the summary information of the second data packet includes: searching for a target file with the same summary information as the summary information of the second data packet in locally stored files; in response to determining that a target file with the same summary information as the summary information of the second data packet has been found, determining that the second data packet has been stored locally, and using the target file as the second data packet stored locally; and in response to determining that no target file with the same summary information as the summary information of the second data packet has been found, determining that the second data packet has not been stored locally.
[0017] In an embodiment of the present disclosure, the summary information of the second data packet is a hash value of the second data packet.
[0018] In an embodiment of the present disclosure, the above-mentioned first data packet includes: a game file; wherein, the loading of the downloaded first data packet and the second data packet includes: loading the game file of the first data packet; during the loading process, in response to determining that the game file references an engine file, searching for the engine file in the first data packet; in response to determining that the engine file is found in the first data packet, loading the engine file and rendering it; and in response to determining that the engine file is not found in the first data packet, searching for the engine file in the second data packet, and loading the found engine file and rendering it.
[0019] In an embodiment of the present disclosure, the above-mentioned first data packet includes: a game file; wherein, loading the downloaded first data packet and the locally stored second data packet includes: loading the game file of the first data packet; during the loading process, in response to determining that the game file references an engine file, searching for the engine file in the first data packet; in response to determining that the engine file is found in the first data packet, loading the engine file and rendering it; and in response to determining that the engine file is not found in the first data packet, searching for the engine file in the locally stored second data packet, and loading the found engine file and rendering it.
[0020] In an embodiment of the present disclosure, the above method further includes: receiving the storage address of the third data packet sent by the server; and in response to determining based on the configuration information that the loading of the first data packet and the second data packet is not supported, downloading the third data packet based on the storage address of the third data packet, and loading the downloaded third data packet; in response to determining based on the configuration information that the loading of the first data packet and the second data packet is supported, executing the operation of determining whether the second data packet has been stored locally based on the summary information of the second data packet.
[0021] The data processing device according to the embodiment of the present disclosure includes:
[0022] A file determination module, used to determine the engine file in the game data packet;
[0023] A first packaging module, configured to generate a first data packet based on other files in the game data packet except the engine file;
[0024] A second packaging module, configured to generate a second data packet based on the engine file; and
[0025] The information feedback module is configured to feed back the storage address of the first data packet and the summary information of the second data packet to the client in response to a request instruction from the client.
[0026] The data processing apparatus according to some other embodiments of the present disclosure includes:
[0027] An information request module, configured to send a request instruction to a server in response to detecting a user's operation of starting a game;
[0028] An information receiving module, configured to receive the storage address of the first data packet and summary information of the second data packet sent by the server;
[0029] A file matching module, configured to determine whether the second data packet has been stored locally based on the summary information of the second data packet; and
[0030] The loading module is configured to, in response to determining that the second data packet has been stored locally, download the first data packet based on the storage address of the first data packet, and load the downloaded first data packet and the second data packet stored locally.
[0031] The computer device according to the embodiment of the present disclosure may include:
[0032] One or more processors, memory; and
[0033] one or more programs;
[0034] The one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the above-mentioned data processing method.
[0035] The non-volatile computer-readable storage medium containing the computer program described in the embodiment of the present disclosure, when the computer program is executed by one or more processors, enables the processors to execute the above-mentioned data processing method.
[0036] The computer program product described in the embodiment of the present disclosure includes computer program instructions. When the computer program instructions are run on a computer, the computer is caused to execute the above-mentioned data processing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] FIG1 shows the functional structure of a system 100 for implementing mini-games at this stage;
[0039] FIG2 shows an implementation flow of the data processing method according to some embodiments of the present disclosure;
[0040] FIG3 shows an implementation process of a method for determining an engine file from a game data packet according to some embodiments of the present disclosure;
[0041] FIG4 shows an implementation process of a method for generating a preset file according to some embodiments of the present disclosure;
[0042] FIG5 shows an implementation flow of the data processing method according to other embodiments of the present disclosure;
[0043] FIG6 shows the functional structure of a data processing device according to some embodiments of the present disclosure;
[0044] FIG7 shows the functional structure of a data processing device according to some other embodiments of the present disclosure; and
[0045] FIG8 shows the hardware structure of an exemplary computer device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] To make the objectives, technical solutions, and advantages of the present disclosure more clearly understood, the principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0047] It should be understood herein that any number of elements in the drawings is for illustration only and not for limitation, and any naming is only for distinction and does not have any limiting meaning.
[0048] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the described object changes, the relative position relationship may also change accordingly.
[0049] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0050] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the disclosed technical solution based on the prompt message.
[0051] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0052] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0053] As previously mentioned, when a user launches a mini-game on the client, the client only needs to download the mini-game's initial data packet. Once the initial data packet is loaded and rendered, the mini-game interface can be entered. Therefore, the size of the initial data packet directly affects the time required to launch the mini-game, which in turn significantly affects the user experience.
[0054] Figure 1 is a functional structure diagram of a system 100 for implementing mini-games at this stage. As shown in Figure 1 , the system may include: a game development platform 102 , a server 104 , a client 106 , and a database 108 .
[0055] The game developer creates a game data package through the game development platform 102. After receiving the upload instruction from the game developer, the game development platform 102 uploads the game data package created by the game developer to the server 104. In the embodiments of the present disclosure, the server 104 generally refers to the server that implements the game service.
[0056] The server 104 may include a compiler 1042 and a game service module 1044 .
[0057] The compiler 1042 is used to compile and package the game data package uploaded by the game development platform 102 to obtain the initial game data package. The compiler 1042 then submits the initial game data package to the game service module 1044, which stores the initial game data package in the database 108.
[0058] The game service module may also receive a request instruction for game information from the client 106 and provide the game information to the client 106. The game information may include the storage address of the initial data packet of the game.
[0059] The above-mentioned client 106 is used to send a request instruction to the server 104 to request game information when detecting the user's operation of starting the game; after receiving the storage address of the game's initial data packet, download the game's initial data packet according to the storage address; then, load the initial data packet and render it to enter the game interface.
[0060] The database 108 is used to store the initial data packets of the game.
[0061] In order to further reduce the size of the initial data packet of the above-mentioned game, an embodiment of the present disclosure provides a data processing method, which can be executed by the above-mentioned server 104.
[0062] FIG2 shows the implementation process of the data processing method according to an embodiment of the present disclosure. As shown in FIG2 , the data processing method may include:
[0063] In step 202, the engine file in the game data package is determined.
[0064] In step 204, a first data packet is generated based on other files in the game data packet except the engine file.
[0065] In step 206, a second data packet is generated based on the engine file in the game data packet.
[0066] In step 208 , in response to the request instruction of the client, the storage address of the first data packet and the summary information of the second data packet are fed back to the client.
[0067] In the embodiment of the present disclosure, the above step 208 may further include: in response to a request instruction from the client, feeding back the storage address of the second data packet to the client.
[0068] As can be seen, during the compilation process, the above data processing method first separates the engine files from the game data package uploaded by the mini-program developer, and then packages the other files and engine files in the game data package separately, resulting in a first data package containing the other files and a second data package containing the engine files. Then, when the client sends a request command for game information, the storage addresses of the two data packages are fed back to the client, which then chooses to download both data packages or download only the first data package based on its needs. This is because the vast majority of mini-games are currently developed using several existing game engines, and the versions of the game engines used are generally similar or identical. Furthermore, these engine files also account for a relatively large portion of the code package. Based on these considerations, when a game is first launched, if the client already has similar game engine files locally, directly reusing or adding them can achieve faster download of the game data package, thereby improving startup speed and saving the bandwidth required to download the data packages. The data processing method described in the disclosed embodiments takes advantage of the fact that most mini-games are developed and compiled using the same engine. Therefore, the client is likely to already have stored the engine files required to load the current game. This effectively reduces the bandwidth required to download the data packages and improves game startup speed.
[0069] The following will further describe in detail the implementation method of each step in the above data processing method with reference to the accompanying drawings and specific examples.
[0070] In some embodiments of the present disclosure, the game data package described in step 202 may be a game data package created by a game developer via the game development platform 102 and uploaded to the server 104. That is, the server 104 receives the game data package from the game development platform 102. Typically, the game data package may be a game data package for a mini-game or another game. The game data package may include game configuration files, game files, engine files, and other files.
[0071] In an embodiment of the present disclosure, the determination of the engine file in the game data packet described in step 202 can be specifically implemented by the method shown in FIG3. As shown in FIG3, the method for determining the engine file may include the following steps:
[0072] In step 302, the files in the game data package are matched with the preset files.
[0073] In an embodiment of the present disclosure, the preset file may specifically be a file whitelist. The file whitelist records the identifiers of multiple files. Specifically, the file identifier may be the name of the file or other information that can identify the file. Therefore, in step 302, the identifiers of the files within the game data packet may be matched one by one with the identifiers of the files recorded in the file whitelist to determine whether the files within the game data packet are included in the file whitelist. For files within the game data packet that are included in the preset file, it can be considered that the file matches the preset file.
[0074] In step 304, the file in the game data packet that matches the preset file is used as the engine file.
[0075] In an embodiment of the present disclosure, in the above step 302, if the identifier of a file in the above game data packet matches the identifier of a file recorded in the above file whitelist, that is, a hit, the file in the above game data packet is used as an engine file.
[0076] In the embodiments of the present disclosure, a file whitelist can be used as the above-mentioned preset file because the general engine files of the game engine usually have a prefix or suffix of the corresponding engine. Therefore, it is possible to determine whether a file is an engine file by the file's identification. Therefore, in some embodiments of the present disclosure, the administrator of the game service can directly configure a file whitelist containing the identification of the engine file in the compiler 1042 in advance. In addition, it has been observed that in the data packets of games packaged by the same game engine, the paths of the engine files within the entire package are the same. Therefore, it is also possible to scan, analyze and count the game data packets of multiple games or mini-games that have been launched, and find files with the same path in the game data packets, the same file identification, and a high frequency of citation by matching the paths within the packets, and determine these files as engine files. Specifically, in these embodiments, the server 104 can generate the above-mentioned preset file by the method shown in Figure 4.
[0077] As shown in Figure 4, the above preset file can be generated through the following steps:
[0078] In step 402, a plurality of game data packets are scanned.
[0079] The game data packages may be data packages of multiple existing games or mini-games that have already been launched. These game data packages may be developed using one or more game engines.
[0080] In step 404, an engine file is determined from the files included in the plurality of game data packets according to the identifiers of the files included in the plurality of game data packets and the number of times each file is referenced.
[0081] In an embodiment of the present disclosure, files with the same file identifier and a high frequency of reference are found from multiple game data packets through intra-packet path matching, and these files are identified as engine files. Typically, these engine files also have the same path within the game data packet. Therefore, files with the same path, the same file identifier, and a high frequency of reference can also be found within the game data packet and identified as engine files. Specifically, the frequency of reference can refer to the ratio of the number of times a file is referenced to the number of game data packets scanned. Whether a file is a file with a high frequency of reference can be determined based on a pre-set frequency threshold. If the frequency of reference of a file is greater than or equal to the pre-set frequency threshold, the file is considered to be a file with a high frequency of reference. Furthermore, since the scanned game data packets can be developed using one or more game engines, the files identified in step 404 above with the same intra-packet path, the same file identifier, and a high frequency of reference should also be engine files of one or more engines.
[0082] In step 406, the determined engine file is recorded in the above-mentioned preset file.
[0083] In the above method, by scanning, counting and analyzing the files in the data packets of multiple games or mini-games that have been launched, engine files with the same file identification and a higher frequency of citation can be quickly obtained, and the preset files generated based on the above statistical results are more accurate.
[0084] In steps 204 and 206, the received game data packet is sub-packetized. Specifically, the specific engine files are first separated from the game data packet. Then, the remaining files in the game data packet, excluding the engine files, are compiled and packaged to obtain the first data packet. Furthermore, summary information for the first data packet is determined. This summary information is used to verify the downloaded first data packet after it is downloaded by the client. The separated engine files are also compiled and packaged to obtain a second data packet. Furthermore, summary information for the second data packet is also determined.
[0085] It should be noted that the embodiments of the present disclosure do not limit the execution order of steps 204 and 206. In other words, steps 204 and 206 can be executed in parallel or in any order. For example, step 206 can be executed first, and then step 204.
[0086] In addition, the present disclosure does not limit the method for compiling and packaging the two data packages separated from the engine files. The application can adopt the same method as the existing method for compiling and packaging game or mini-game data packages, which will not be repeated here. The above packaging can refer to packaging in the format required by the server.
[0087] In an embodiment of the present disclosure, the summary information of the first data packet and the summary information of the second data packet may be a hash value of the first data packet and a hash value of the second data packet, which may be calculated using a hash algorithm. For example, the summary information may be the MD5 value of the first data packet and the MD5 value of the second data packet, respectively, calculated using a Message-Digest Algorithm (MD5) for the first data packet and the second data packet.
[0088] After obtaining the first and second data packets corresponding to the game data packet, the server 104 may store the first and second data packets in a database. Furthermore, upon receiving a game information request from a client, the server 104 may provide feedback to the client regarding the storage addresses of the first and second data packets, as well as a summary of the second data packet. The purpose of providing feedback regarding the storage addresses of the first and second data packets is to allow the client to download the required data packets on demand. The first data packet is required when the client first launches a game and typically contains configuration files and game files. Because the second data packet contains the engine file, if the client has previously downloaded the same engine file for another game, downloading the file is unnecessary. However, if the client has not previously downloaded the same engine file, downloading the file is still necessary. Furthermore, providing feedback regarding the summary of the second data packet before the client downloads the data packet allows the client to confirm whether the engine file contained in the second data packet is already locally stored. This is because the summary of the second data packet is a hash value of the second data packet, such as an MD5 hash. Typically, hash values for different files are different, but if two files have the same hash values, they are considered identical. Therefore, after receiving the summary information of the second data packet, the client can search for files stored in the client according to the summary information of the received second data packet, thereby determining whether the second data packet has been stored.
[0089] It can be seen that through the above method, the game data packet can be separated into a first data packet and a second data packet. If the client has already downloaded the same engine file, the client can only download the first data packet when starting the game for the first time without downloading the second data packet, thereby reducing the bandwidth occupied by data transmission and reducing the delay in data downloading, thereby improving the startup speed of the game.
[0090] It should be noted that, to ensure compatibility with client versions that do not support loading sub-packages of games, traditional game data packet processing methods can be provided for these client versions. In this case, the data processing method can further include compiling and packaging the files in the game data packet to obtain a third data packet; and in response to determining that the client has requested the game, feeding back the storage address of the third data packet to the client.
[0091] In other words, while the game data packet is subjected to engine file separation, the existing method of compiling and packaging the game data packet is retained, resulting in a third data packet containing the complete file. At this point, the server 104 will also store the third data packet and, upon receiving a request from the client for game information, will provide the storage address of the third data packet along with other information to the client. In this way, if the client determines, based on its own configuration information, that it does not support loading the first and second data packets, it can download the third data packet based on its storage address and load the downloaded third data packet, thereby ensuring compatibility of the above data processing method with different client versions.
[0092] Corresponding to the above-mentioned data processing method executed by the server, the embodiment of the present disclosure also provides a data processing method executed by the client. FIG5 shows the implementation flow of the data processing method executed by the client according to the embodiment of the present disclosure. As shown in FIG5 , the above-mentioned data processing method includes:
[0093] In step 502, in response to detecting the user's operation of starting the game for the first time, a request instruction is sent to the server.
[0094] Typically, for mini-games, users can find multiple mini-games through the mini-game list entrance on the client. When a user clicks a mini-game icon for the first time, that is, when the mini-game is launched for the first time, the client will send a request instruction to the server to request information about the mini-game.
[0095] In step 504, the storage address of the first data packet and the summary information of the second data packet sent by the server are received.
[0096] In an embodiment of the present disclosure, the above step 504 may further include: receiving a storage address of a second data packet sent by the server.
[0097] In an embodiment of the present disclosure, the game information received by the client from the server may include: the storage address of the first data packet and summary information of the second data packet. The game information received by the client from the server may further include: the storage address of the second data packet. As previously described, the storage address of the first data packet and the storage address of the second data packet in the game information are used to download the first and second data packets. The summary information of the second data packet is used to query whether the second data packet is already stored locally.
[0098] In step 506, it is determined whether the second data packet has been stored locally based on the summary information of the second data packet.
[0099] In an embodiment of the present disclosure, step 506 may include: first, searching locally stored files for a target file whose digest information is identical to the digest information of the second data packet; in response to determining that a target file whose digest information is identical to the digest information of the second data packet is found, determining that the second data packet is already stored locally and using the target file as the locally stored second data packet; and in response to determining that no target file whose digest information is identical to the digest information of the second data packet is found, determining that the second data packet is not already stored locally. The digest information of the second data packet may be a hash value of the second data packet, for example, an MD5 value of the second data packet calculated using the MD5 algorithm. As previously described, hash values calculated based on different files are different. Therefore, if two files have the same hash values, the two files can be considered identical. Based on this, in step 506, the client can search its own stored files for a file whose digest information is identical to the digest information of the second data packet based on the digest information of the received second data packet, thereby determining whether the second data packet is already stored.
[0100] In step 508 , in response to determining that the second data packet has been stored locally, the first data packet is downloaded based on the storage address of the first data packet, and the downloaded first data packet and the locally stored second data packet are loaded.
[0101] In an embodiment of the present disclosure, if a file with the same summary information as the summary information of the above-mentioned second data packet can be found in the locally stored files, it means that the client has previously downloaded and saved the same engine file. At this time, the client can only download the first data packet and reuse the stored second data packet. Since the first data packet includes the game file, the client will first load the game file of the first data packet. During the loading process, if the above-mentioned game file references the engine file, the engine file is first searched in the first data packet; if the engine file is found in the first data packet, the engine file is directly loaded and rendered; and if the engine file is not found in the first data packet, the engine file is continued to be searched in the locally stored second data packet, and then the found engine file is loaded and rendered. Furthermore, if the engine file is still not found in the locally stored second data packet, the client can report an error to the server or re-download the first data packet and the second data packet, and so on.
[0102] In other embodiments of the present disclosure, the above-mentioned data processing method may further include: in response to determining that the second data packet is not stored locally, downloading the first data packet based on the storage address of the first data packet, downloading the second data packet based on the storage address of the second data packet, and loading the downloaded first data packet and second data packet.
[0103] In an embodiment of the present disclosure, if a file whose summary information is the same as the summary information of the above-mentioned second data packet is not found in the locally stored files, it means that the client has not previously downloaded the same engine file as that in the current game data packet. At this time, the client should download the above-mentioned first data packet and the second data packet concurrently. Since the first data packet includes the game file, the client should first load the game file of the first data packet. During the loading process, if the above-mentioned game file references the engine file, the engine file is first searched in the first data packet; if the engine file is found in the first data packet, the engine file is directly loaded and rendered; and if the engine file is not found in the first data packet, the engine file is continued to be searched in the downloaded second data packet, and then the found engine file is loaded and rendered. Furthermore, if the engine file is still not found in the second data packet, the client can report an error to the server or re-download the above-mentioned first data packet and second data packet, and so on.
[0104] As can be seen from the above data processing process, when a user first launches a game, the client can determine whether the second data packet is already stored locally based on the summary information of the second data packet returned by the server. If the client determines that the second data packet is already stored locally, it can download only the first data packet and reuse the locally stored second data packet to complete game loading and rendering. Since the client does not need to download the second data packet in this case, the amount of data required to launch the game is greatly reduced. Furthermore, since the client does not need to wait for the second data packet to download, the game startup time is also greatly shortened, thereby achieving the goal of accelerating startup and saving data transmission bandwidth.
[0105] In some other embodiments of the present disclosure, the game information received from the server may further include a storage address of a third data packet, wherein the third data packet includes all files required to start the game.
[0106] In this case, the client will first determine, based on the configuration information, whether it supports loading the first and second data packets, that is, whether it supports loading sub-packets of the game. If it is determined that it does not support loading the first and second data packets, the client will download the third data packet based on the storage address of the third data packet and load the downloaded third data packet. If it is determined that it supports loading the first and second data packets, it can continue to perform the operation described in step 506 above to determine whether the second data packet is already stored locally based on the summary information of the second data packet.
[0107] It can be seen that by providing the third data packet, the needs of clients that do not support game sub-packet loading can be met, thereby improving the compatibility of the above data processing method with different client versions.
[0108] Based on the same inventive concept, corresponding to the method described in any of the above embodiments, the present disclosure further provides a data processing device. The above data processing device can be installed in a server. FIG6 shows the functional structure of the data processing device described in an embodiment of the present disclosure. As shown in FIG6, the above data processing device may include:
[0109] A file determination module 602 is used to determine the engine file in the game data packet;
[0110] A first packaging module 604 is configured to generate a first data packet based on other files in the game data packet except the engine file;
[0111] A second packaging module 606 is configured to generate a second data packet based on the engine file;
[0112] The information feedback module 608 is configured to feed back the storage address of the first data packet and the summary information of the second data packet to the client in response to determining that the client requests the game.
[0113] The present disclosure also provides another data processing device. The data processing device can be installed in a client. FIG7 shows the functional structure of the data processing device according to an embodiment of the present disclosure. As shown in FIG7, the data processing device can include:
[0114] An information request module 702 is configured to send a request instruction to a server in response to detecting a user's operation of starting a game;
[0115] The information receiving module 704 is configured to receive the storage address of the first data packet and the summary information of the second data packet sent by the server;
[0116] A file matching module 706 is configured to determine whether the second data packet has been stored locally based on the summary information of the second data packet; and
[0117] The loading module 708 is configured to, in response to determining that the second data packet has been stored locally, download the first data packet based on the storage address of the first data packet, and load the downloaded first data packet and the locally stored second data packet.
[0118] It should be noted that the specific implementation methods of the above modules can be referred to the above embodiments and will not be repeated here.
[0119] As can be seen from the above-described data processing device, after receiving a game data packet, the server can separate the game data packet into a first data packet and a second data packet. When the client sends a request for game information, the server provides the client with the storage address of the first data packet, the storage address of the second data packet, and a summary of the second data packet. Thus, when a user first launches a game, the client can determine whether the second data packet is already stored locally based on the summary information of the second data packet returned by the server. If the client determines that the second data packet is already stored locally, it can download only the first data packet and reuse the locally stored second data packet to complete game loading and rendering. In this case, since the client does not need to download the second data packet, the amount of data required to launch the game is significantly reduced. Furthermore, since the client does not need to wait for the second data packet to download, the game startup time is also significantly shortened, thereby accelerating startup and saving data transmission bandwidth.
[0120] FIG8 shows a more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other within the device via the bus 1050.
[0121] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0122] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0123] The input / output interface 1030 is used to connect an input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0124] The communication interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0125] The bus 1050 comprises a path for transmitting information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).
[0126] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0127] The electronic device of the above embodiment is used to implement the corresponding data processing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0128] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the data processing method described in any of the above embodiments.
[0129] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid-state drives (SSDs)), etc.
[0130] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the data processing method described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0131] Those skilled in the art will appreciate that embodiments of the present disclosure may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present disclosure may also be implemented in the form of a computer program product in one or more computer-readable media containing computer-readable program code.
[0132] Any combination of one or more computer-readable media can be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive examples) of computer-readable storage media can include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0133] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0134] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0135] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0136] It should be understood that each block in the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine. These computer program instructions are executed by the computer or other programmable data processing device to produce a device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0137] These computer program instructions may also be stored in a computer-readable medium that causes a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable medium produce a product comprising an instruction device that implements the functions / operations specified in the blocks in the flowcharts and / or block diagrams. The computer program instructions may also be loaded onto a computer, other programmable data processing device, or other device so that a series of operational steps are executed on the computer, other programmable data processing device, or other device to produce a computer-implemented process, such that the instructions executed on the computer or other programmable device provide a process that implements the functions / operations specified in the blocks in the flowcharts and / or block diagrams.
[0138] Furthermore, although the operations of the disclosed method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in that particular order, or that all of the operations shown must be performed to achieve the desired results. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into a single step, and / or a single step may be broken down into multiple steps.
[0139] The use of the verbs "comprise", "include" and their conjugations in the application documents does not exclude the presence of elements or steps other than those stated in the application documents. The article "a" or "an" preceding an element does not exclude the presence of a plurality of such elements.
[0140] Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division into various aspects does not mean that the features of these aspects cannot be combined to benefit. Such division is merely for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims
1. A data processing method, executed by a server, comprising: Determine the engine files in the game data package; Generate a first data packet based on other files in the game data packet except the engine file; Generate a second data packet based on the engine file in the game data packet; In response to a request instruction from the client, the storage address of the first data packet and the summary information of the second data packet are sent to the client.
2. The method according to claim 1, wherein: Also includes: In response to a request instruction from the client, the storage address of the second data packet is sent to the client.
3. The method according to claim 1, wherein: Determining the engine file in the game data packet includes: Matching the files in the game data package with the preset files; and The file in the game data packet that matches the preset file is used as the engine file.
4. The method according to claim 3, further comprising: Scan multiple game data packages; Determining an engine file from the files included in the multiple game data packets according to the identifiers of the files included in the multiple game data packets and the number of times each file is referenced; as well as The determined engine file is recorded in the preset file.
5. The method according to claim 1, wherein: The generating of the first data packet based on other files in the data packet of the game except the engine file comprises: Separating the engine file from the game data packet; and Compile and package the remaining files in the game data packet to obtain the first data packet.
6. The method according to claim 5, wherein: Generating a second data packet based on the engine file in the game data packet comprises: The separated engine files are compiled and packaged to obtain the second data packet; and summary information of the second data packet is determined.
7. The method according to claim 1, further comprising: Compiling and packaging the files in the game data packet to obtain a third data packet; as well as In response to the request instruction, the storage address of the third data packet is fed back to the client.
8. A data processing method, executed by a client, comprising: In response to detecting the user's operation of launching the game for the first time, sending a request instruction to the server; Receive the storage address of the first data packet and the summary information of the second data packet sent by the server; determining whether the second data packet has been stored locally based on the summary information of the second data packet; In response to determining that the second data packet has been stored locally, the first data packet is downloaded based on the storage address of the first data packet, and the downloaded first data packet and the second data packet stored locally are loaded.
9. The method according to claim 8, further comprising: Receiving the storage address of the second data packet sent by the server; In response to determining that the second data packet is not stored locally, a first data packet is downloaded based on the storage address of the first data packet, a second data packet is downloaded based on the storage address of the second data packet, and the downloaded first data packet and second data packet are loaded.
10. The method according to claim 8, wherein: The determining, based on the summary information of the second data packet, whether the second data packet has been stored locally comprises: Searching for a target file whose summary information is the same as the summary information of the second data packet in the locally stored files; In response to determining that a target file having the same summary information as the summary information of the second data packet is found, determining that the second data packet has been stored locally, and using the target file as the second data packet stored locally; and In response to determining that no target file having the same summary information as the summary information of the second data packet is found, it is determined that the second data packet is not stored locally.
11. The method according to claim 10, wherein: The summary information of the second data packet is a hash value of the second data packet.
12. The method according to claim 9, wherein: The first data packet includes: game files; wherein, The first data packet and the second data packet loaded and downloaded include: Load the game file of the first data packet; During the loading process, in response to determining that the game file references an engine file, searching the first data packet for the engine file; In response to determining that the engine file is found in the first data packet, loading the engine file and performing rendering; and In response to determining that the engine file is not found in the first data packet, the engine file is searched in the second data packet, and the found engine file is loaded and rendered.
13. The method according to claim 8, wherein: The first data packet includes: game files; wherein, The loading of the downloaded first data packet and the locally stored second data packet includes: Load the game file of the first data packet; During the loading process, in response to determining that the game file references an engine file, searching the first data packet for the engine file; In response to determining that the engine file is found in the first data packet, loading the engine file and performing rendering; and In response to determining that the engine file is not found in the first data packet, the engine file is searched in the second data packet stored locally, and the found engine file is loaded and rendered.
14. The method according to claim 8, further comprising: Receive the storage address of the third data packet sent by the server; as well as In response to determining that loading of the first data packet and the second data packet is not supported based on the configuration information, downloading a third data packet based on a storage address of the third data packet, and loading the downloaded third data packet; In response to determining that loading of the first data packet and the second data packet is supported based on the configuration information, the operation of determining whether the second data packet is stored locally based on the summary information of the second data packet is performed.
15. A data processing device, comprising: A file determination module, used to determine the engine file in the game data packet; A first packaging module, used to generate a first data packet based on other files in the game data packet except the engine file; A second packaging module, used to generate a second data packet based on the engine file; as well as The information feedback module is used to feed back the storage address of the first data packet and the summary information of the second data packet to the client in response to a request instruction from the client.
16. A data processing device, comprising: An information request module, configured to send a request instruction to a server in response to detecting an operation of a user starting a game; An information receiving module, used for receiving the storage address of the first data packet and the summary information of the second data packet sent by the server; A file matching module is used to determine whether the local file already exists based on the summary information of the second data packet. storing the second data packet; as well as The loading module is used for, in response to determining that the second data packet has been stored locally, downloading the first data packet based on the storage address of the first data packet, and loading the downloaded first data packet and the second data packet stored locally.
17. A computer device comprising: One or more processors, memory; as well as one or more programs; The one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the data processing method according to any one of claims 1 to 14.
18. A non-volatile computer-readable storage medium containing a computer program, which, when executed by one or more processors, enables the processors to execute the data processing method according to any one of claims 1 to 14.
19. A computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the data processing method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Application distribution and rapid loading and running system and method
CN104156243A
Quick starting method for installation of cell phone games
CN104360871A
Application starting method and related device
CN105119944A
Method and apparatus for loading application program
CN105224363A
System and method for network-loading game data
US20060142087A1
