CN109908585B - File processing method and system, computing device and storage medium - Google Patents

File processing method and system, computing device and storage medium Download PDF

Info

Publication number
CN109908585B
CN109908585B CN201910169501.5A CN201910169501A CN109908585B CN 109908585 B CN109908585 B CN 109908585B CN 201910169501 A CN201910169501 A CN 201910169501A CN 109908585 B CN109908585 B CN 109908585B
Authority
CN
China
Prior art keywords
file
additional resource
resource file
package
index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910169501.5A
Other languages
Chinese (zh)
Other versions
CN109908585A (en
Inventor
崔珑
梁斌
罗富文
高勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Digital Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Kingsoft Digital Network Technology Co Ltd filed Critical Zhuhai Kingsoft Digital Network Technology Co Ltd
Priority to CN201910169501.5A priority Critical patent/CN109908585B/en
Publication of CN109908585A publication Critical patent/CN109908585A/en
Application granted granted Critical
Publication of CN109908585B publication Critical patent/CN109908585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a file processing method and system, a computing device and a storage medium, wherein the method comprises the following steps: acquiring a necessary resource file package and an index file from a server, wherein the necessary resource file package comprises a plurality of necessary resource files; acquiring at least one corresponding additional resource file sub-package in the additional resource file package from the server according to the user information, wherein each additional resource file sub-package comprises a plurality of corresponding additional resource files; generating a file packet queue according to the acquired necessary resource file packet and the acquired additional resource file sub-packet; checking necessary resource files and additional resource files in the file packet queue according to the index file, and marking and damaging the additional resource files which fail to be checked; and running the file packet queue, sending an acquisition request to a server under the condition that the first additional resource file to be loaded is marked and damaged, and re-acquiring the first additional resource file according to the index file.

Description

File processing method and system, computing device and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a file processing method and system, a computing device, and a storage medium.
Background
In the operation process of the network game, the repair and the update of the game data are two problems which cannot be avoided, the existing repair process comprises that a client prompts a user to download a file package of a part needing to be repaired, the file package is installed according to an operation prompt and an existing version is covered, the update of the game data involves the download of a client update package and the replacement of a relevant part in an original game file of the client without exception, however, once the repair and the update of a game developer to the whole game are involved, the problem is complicated, sometimes, the developer only modifies one line of codes, the compiling and packaging of the whole game file are required, and the publishing, publicizing and prompting operations are carried out, the repair cost of the developer side is high, and in the client side, the user is required to wait for the download and the installation of an upgrade package, and the user cannot play the game before the update and the installation are successful.
As the amount of games increases, the updating amount and the repairing complexity of the games increase, so that the waiting time of the user becomes longer, the failure rate also increases, and the game experience of the user becomes worse. Therefore, for games that need to be updated more frequently or in large quantities, some attention needs to be paid to updating and repairing.
Disclosure of Invention
In view of this, embodiments of the present application provide a file processing method and system, a computing device, and a storage medium, so as to solve technical defects in the prior art.
The application also provides a file processing method, which comprises the following steps:
acquiring a necessary resource file package and an index file from a server, wherein the necessary resource file package comprises a plurality of necessary resource files;
acquiring at least one corresponding additional resource file sub-package in the additional resource file package from the server according to the user information, wherein each additional resource file sub-package comprises a plurality of corresponding additional resource files;
generating a file packet queue according to the acquired necessary resource file packet and the acquired additional resource file sub-packet;
checking necessary resource files and additional resource files in the file packet queue according to the index file, and marking and damaging the additional resource files which fail to be checked;
and running the file packet queue, sending an acquisition request to a server under the condition that the first additional resource file to be loaded is marked and damaged, and re-acquiring the first additional resource file according to the index file.
Optionally, before the running the file packet queue, the method further includes:
and the necessary resource file which fails to be checked is retrieved from the server through the index file and covered.
Optionally, marking the additional resource file that fails to be verified as corrupted includes:
acquiring index information corresponding to the additional resource file failed in verification in the index file;
and marking an identification field in the index information of the additional resource file with the failed verification as not downloaded.
Optionally, after the additional resource file marked with the corruption is obtained again according to the index file, the method further includes:
and adding the first additional resource file which is obtained again at the tail end of the file packet queue, and covering the first additional resource file marked as damaged.
Optionally, after the generating the bundle queue, the method further includes:
acquiring a necessary resource file update package from the server;
acquiring at least one additional resource file update sub-packet in the additional resource file update packet from the server according to the user information;
and acquiring an index patch file, and updating the index file according to the index patch file.
Optionally, after updating the index file according to the index patch file, the method further includes:
adding the acquired necessary resource file update package and the acquired at least one additional resource file update package to the tail of the file package queue to obtain an updated file package queue;
and running the updated file packet queue.
Optionally, after the updated bundle queue is run, the method further includes:
acquiring at least one corresponding additional resource file update sub-package corresponding to the updated user information from the server through the updated index file according to the updated user information;
and adding the additional resource file update sub-package corresponding to the updated user information to the tail of the updated file package queue.
Optionally, the user information includes an instruction of the user, rating information of the user, or role information of the user.
Optionally, the checking the necessary resource files and the additional resource files in the file packet queue according to the index file includes:
checking the necessary resource file by adopting an information abstract algorithm;
and checking the additional resource file sub-packets by adopting a 32-bit cyclic redundancy check method or an information summarization algorithm.
Optionally, in a case that the first additional resource file to be loaded is marked as being damaged, the method includes:
receiving an instruction of a user to read the first additional resource file marked as damaged or determining that the user is about to read the first additional resource file marked as damaged.
The present application also provides a document processing system, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is configured to acquire a necessary resource file package and an index file from a server side, and the necessary resource file package comprises a plurality of necessary resource files;
the acquisition module is further configured to acquire at least one corresponding additional resource file sub-package in the additional resource file package from the server according to the user information, wherein each additional resource file sub-package comprises a plurality of corresponding additional resource files;
the execution module is configured to generate a file packet queue according to the acquired necessary resource file packet and the acquired additional resource file sub-packet;
the verification module is configured to verify the necessary resource files and the additional resource files in the file packet queue according to the index file and mark and damage the additional resource files which fail to be verified;
and the first repairing module is configured to run the file packet queue, send an acquisition request to a server under the condition that the first additional resource file to be loaded is marked to be damaged, and reacquire the first additional resource file according to the index file.
Optionally, the method further includes:
and the second repair module is configured to retrieve and cover the necessary resource file which fails to be checked from the server through the index file.
Optionally, the verification module includes:
the index unit is configured to acquire index information corresponding to the additional resource file failed in verification in the index file;
and the marking unit is configured to mark the identification field in the index information of the additional resource file with failed verification as not downloaded.
Optionally, the method further includes:
an appending module configured to add the retrieved first additional resource file at the end of the bundle queue and overwrite the first additional resource file marked as damaged.
Optionally, the method further includes:
a first update module configured to obtain a necessary resource file update package from the server;
the first updating module is further configured to obtain at least one additional resource file updating sub-packet in the additional resource file updating packet from the server according to the user information;
the first updating module is further configured to obtain an index patch file and update the index file according to the index patch file.
Optionally, the method further includes:
the first sorting module is configured to add the acquired necessary resource file update package and the acquired at least one additional resource file update package to the tail of the file package queue to obtain an updated file package queue;
an execution module configured to execute the updated bundle queue.
Optionally, the method further includes:
the second updating module is configured to acquire at least one corresponding additional resource file updating sub-package corresponding to the updated user information from the server through the updated index file according to the updated user information;
a second sorting module configured to add the additional resource file update package corresponding to the updated user information to the end of the updated file package queue.
Optionally, the verification module includes:
the first checking unit is configured to check the necessary resource file by adopting an information abstract algorithm;
and the second checking unit is configured to check the additional resource file sub-packets by adopting a 32-bit cyclic redundancy checking method or an information summarization algorithm.
Optionally, the first repair module includes:
and the repair triggering unit is configured to receive an instruction of a user to read the first additional resource file marked with the damage or determine that the user is about to read the first additional resource file marked with the damage.
The application also provides a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the file processing method when executing the instructions.
The present application also provides a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the file processing method.
According to the file processing method and system, the computing device and the storage medium, files in a file system are divided into necessary resource file packages which need to be downloaded and additional resource file packages which can be selectively downloaded, the additional resource file packages are divided into a plurality of additional resource file sub-packages, any client can obtain one or more additional resource file sub-packages in the additional resource file sub-packages from a server according to user information, customization, management and file deletion of the client are facilitated, meanwhile, when the file system is repaired, only the necessary resource files are forcibly repaired, the additional resource files are marked to be damaged and are delayed to be repaired, and when the client judges that the user needs to use the marked-to-be-damaged additional resource files, the repairing is carried out, so that the data volume and waiting time which need to be obtained are reduced, the file repairing speed is increased, the possibility of file system breakdown is reduced, and the client can continuously keep running of a game in the process of repairing the additional resource files, so that user experience is improved, and the file processing method and the storage medium are suitable for future large-scale games.
Drawings
FIG. 1 is a block diagram of a computing device according to an embodiment of the present application;
FIG. 2 is a flow chart of a document processing method of an embodiment of the present application;
FIG. 3 is a flow chart of a document processing method of another embodiment of the present application;
FIG. 4 is a flow chart of a document processing method according to another embodiment of the present application;
FIG. 5 is a flow chart of a document processing method of another embodiment of the present application;
FIG. 6 is a schematic structural diagram of a document processing system according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a document processing system according to another embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can be termed a second and, similarly, a second can be termed a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at" \8230; "or" when 8230; \8230; "or" in response to a determination ", depending on the context.
In the present application, a document processing method is provided, which is described in detail in the following examples one by one.
Fig. 1 is a block diagram illustrating a structure of a computing device 100 according to an embodiment of the present specification. The components of the computing device 100 include, but are not limited to, memory 110 and processor 120. The processor 120 is coupled to the memory 110 via a bus 130 and a database 150 is used to store data.
Computing device 100 also includes access device 140, access device 140 enabling computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 140 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 100 and other components not shown in FIG. 1 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 1 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.
Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 100 may also be a mobile or stationary server.
Wherein the processor 120 may perform the steps of the method shown in fig. 2. Fig. 2 is a schematic flowchart illustrating a file processing method according to an embodiment of the present application, applied to a client, including steps 201 to 205.
Step 201: and acquiring a necessary resource file package and an index file from a server, wherein the necessary resource file package comprises a plurality of necessary resource files.
Step 202: and acquiring at least one corresponding additional resource file sub-package in the additional resource file package from the server according to the user information, wherein each additional resource file sub-package comprises a plurality of corresponding additional resource files.
In this embodiment, the server may be a server of a network game, a game resource file is stored in the server, and the directory of the game resource file includes a necessary resource folder and an additional resource folder, where the necessary resource folder includes necessary file resources for maintaining normal operation of the game, such as a logic configuration data file, a login scene resource data file, a basic character data file, a basic UI data file, and a new village map resource file, and the additional resource folder includes additional file resources in the game operation, such as a map resource, a character resource, an NPC resource, a sound effect music resource, and a high definition map resource.
A game developer packs game resource files through a packing tool at a server side according to a configuration table to finally obtain a complete game resource package, wherein the game resource package comprises a necessary resource file package, an additional resource file package and an index file, a plurality of necessary resource files are stored in the necessary resource file package in a concentrated compression mode, the additional resource file package comprises a plurality of additional resource file sub-packages, a specific additional resource file is stored in each additional resource file sub-package in a concentrated compression mode, and the mapping relation between the files stored in the game resource package and all the files stored in the game resource files is recorded in the index file, so that the file system can accurately return data to an upper system under the condition that the upper system transmits path information of the specific files to the file system.
In this embodiment of the application, all the clients need to download the necessary resource files when installed, and the user may manually select at least one additional resource file sub-package corresponding to the additional resource file package to download, or each client may automatically download at least one additional resource file sub-package corresponding to the additional resource file package according to characteristics of the player, such as a class, a occupation, a gate assignment, and the like, so that the number and/or the types of the downloaded resource file sub-packages may be different between the clients.
Step 203: and generating a file packet queue according to the acquired necessary resource file packet and the acquired additional resource file packet.
In the embodiment of the application, the client generates a file packet queue, namely an initial game file list of the client, from the acquired necessary resource file packets and the acquired additional resource file packets, and the client enables a user to play a game by loading the file packet queue.
Step 204: and checking the necessary resource files and the additional resource files in the file packet queue according to the index file, and marking and damaging the additional resource files which fail to be checked.
In the embodiment of the application, all the entries in the traversal index file are used for respectively checking the correctness of the data corresponding to each entry, for the first additional resource file which fails to be checked, the client does not repair the first additional resource file temporarily but marks the first additional resource file which fails to be checked to be damaged, and after the data in all the necessary resource files are repaired, a user can start a game.
Optionally, the client may check the necessary resource file by using an information digest algorithm (MD 5), for example, pull a corresponding MD5 check file from the server side, where the MD5 check file includes a preset hash value (MD 5 check value) of the necessary resource file, and at the same time, the client performs hash operation on the acquired necessary resource file to obtain a calculated hash value, and compares the polarities of the preset hash value and the calculated hash value to check the necessary resource file, and if the two obtained values are the same, it indicates that the transmitted data is complete and error-free and has not been tampered.
Optionally, the client may check the sub-packets of the additional resource files by using a Cyclic Redundancy Check (CRC) method, for example, each additional resource file includes an additional data header, where a 32-bit CRC value of the additional resource file is stored in the data header, when the client tries to open the additional resource file, the client may quickly calculate a 32-bit CRC value of the local file data and compare the 32-bit CRC value with the 32-bit CRC value stored in the data header, if the 32-bit CRC value of the additional resource file is consistent with the 32-bit CRC value stored in the data header, it is determined that the additional resource file is not damaged, and if the 32-bit CRC value of the additional resource file is inconsistent with the 32-bit CRC value stored in the data header, it is determined that the additional resource file is damaged.
Of course, the 32-bit CRC check value is only one of the preferred embodiments for performing file corruption self-checking in this application, and as other preferred embodiments, the MD5 value may be used instead of the 32-bit CRC check value to perform comparison self-checking, or perform self-checking in other manners.
Step 205: and running the file packet queue, sending an acquisition request to a server under the condition that the first additional resource file to be loaded is marked and damaged, and re-acquiring the first additional resource file according to the index file.
In the embodiment of the application, when a game program requests a file system to read a first additional resource file marked with damage, the file system obtains the first additional resource file from a game resource file at a server side according to the index file, and actual repair is completed. The judgment criteria for the game program to request the file system to read the first additional resource file marked as damaged may include two criteria: one is that when a client requests to read an additional resource file from a bottom layer in a game, a first additional resource file marked as damaged may be read; another is that the first additional resource file marked as corrupt may also be triggered when the resource is downloaded in the resource manager of the game.
In another embodiment of the present application, before the running the file packet queue, the method further includes:
and the necessary resource file which fails to be checked is retrieved from the server through the index file and covered.
In the embodiment of the application, for the necessary resource files which are failed to be checked, the client directly pulls the corresponding necessary resource files from the server and repairs the necessary resource files.
In another embodiment of the present application, marking additional resource files that fail the check as corrupt, as shown in fig. 3, comprises steps 301 to 302.
Step 301: and acquiring index information corresponding to the additional resource file with the failed verification in the index file.
In the embodiment of the present application, the index file includes location information of a file, remote location information of the file, a file size, a flag field, and the like, where the location information of the file is location information of each necessary resource file in a necessary resource file package or location information of each additional resource file in an additional resource file package, the remote location information of the file is a location where each necessary resource file or each additional resource file is recorded in the server side, and the flag field is whether the file is local or compressed, and the like.
Step 302: and marking an identification field in the index information of the additional resource file with the failed verification as not downloaded.
In this embodiment of the present application, the file system marks the additional resource file that fails to be verified as damaged, and does not repair the additional resource file immediately, and then performs delayed repair when the additional resource file to be loaded is marked as damaged, where receiving an instruction from a user to read the first additional resource file that is marked as damaged or determining that the user is about to read the first additional resource file that is marked as damaged when the first additional resource file to be loaded is marked as damaged. For example, an additional resource file marked as damaged records map information of a place in a game, when a game character of a user does not enter the place area, the file system does not repair the additional resource file, and when the file system receives an instruction of the user to enter the place map or determines that the user is about to enter the place area, the repair of the additional resource file is started.
In another embodiment of the present application, after retrieving the first additional resource file according to the index file, the method further includes:
and adding the first additional resource file which is obtained again at the tail end of the file packet queue, and covering the first additional resource file marked as damaged.
In the embodiment of the application, the file system adopts an addition mode, the file system does not immediately delete the resource packages marked with damage but marks the resource packages with damage, and then adds the newly acquired first additional resource file at the tail of the file package queue and covers the first additional resource file marked with damage, so that the method is different from a processing mode of filling a newly added file into a corresponding position of an original file in the prior art, the possibility of memory fragments generated inside a client is reduced by adopting a file structure in an addition form, and meanwhile, the whole repair process only takes about tens of milliseconds, so that the client can synchronously perform file repair in the game process.
Optionally, the user information includes an instruction of the user, rating information of the user, or role information of the user.
The files in the file system are divided into the necessary resource file packet which needs to be downloaded and the additional resource file packet which can be selectively downloaded, the additional resource file packet is divided into a plurality of additional resource file sub-packets, any client can obtain one or more additional resource file sub-packets in the plurality of additional resource file sub-packets from the server according to user information, customization, management and file deletion of the client are facilitated, meanwhile, when the file system is repaired, only the necessary resource files are forcibly repaired, the additional resource files are marked to be damaged and delayed to be repaired, and when the client judges that the user needs to use the marked damaged additional resource files, the repair is carried out, so that the data volume and the waiting time which need to be obtained are reduced, the file repair speed is increased, the possibility of file system collapse is reduced, the client can continuously keep the running of a game in the process of repairing the additional resource files, the user experience is improved, and the method is suitable for future large-scale games.
In another embodiment of the present application, the processor 120 may further perform the steps of the method shown in fig. 4. Fig. 4 is a schematic flowchart showing a document processing method according to an embodiment of the present application, including steps 401 to 406.
Step 401: and acquiring a necessary resource file package and an index file from a server, wherein the necessary resource file package comprises a plurality of necessary resource files.
Step 402: and acquiring at least one corresponding additional resource file sub-package in the additional resource file package from the server according to the user information, wherein each additional resource file sub-package comprises a plurality of corresponding additional resource files.
In this embodiment, the server may be a server of a network game, a game resource file is stored in the server, and the directory of the game resource file includes a necessary resource folder and an additional resource folder, where the necessary resource folder includes necessary file resources for maintaining normal operation of the game, such as a logic configuration data file, a login scene resource data file, a basic character data file, a basic UI data file, and a newsletter map resource file, and the additional resource folder includes additional file resources in the game operation, such as a map resource, a character resource, an NPC resource, a sound effect music resource, and a high definition map resource.
A game developer packs game resource files through a packing tool at a server side according to a configuration table to finally obtain a complete game resource package, wherein the game resource package comprises a necessary resource file package, an additional resource file package and an index file, a plurality of necessary resource files are stored in the necessary resource file package in a centralized compression mode, the additional resource file package comprises a plurality of additional resource file sub-packages, a specific additional resource file is stored in each additional resource file sub-package in a centralized compression mode, and the mapping relation between the files stored in the game resource package and all the files stored in the game resource files is recorded in the index file, so that the file system can accurately return data to the upper system under the condition that the upper system transmits path information of the specific file to the file system.
In this embodiment of the application, all the clients need to download the necessary resource files when installed, and the user may manually select at least one additional resource file sub-package corresponding to the additional resource file package to download, or each client may automatically download at least one additional resource file sub-package corresponding to the additional resource file package according to characteristics of the player, such as a class, a occupation, a gate assignment, and the like, so that the number and/or the types of the downloaded resource file sub-packages may be different between the clients.
Step 403: and generating a file packet queue according to the acquired necessary resource file packet and the acquired additional resource file packet.
In the embodiment of the application, the client generates a file packet queue, namely an initial game file list of the client, by sub-packaging the acquired necessary resource file packet and the acquired additional resource file, and the client enables a user to play a game by loading the file packet queue.
Step 404: and acquiring a necessary resource file update package from the server.
Step 405: and acquiring at least one additional resource file update sub-packet in the additional resource file update packets from the server according to the user information.
In an embodiment of the present application, a game developer configures a game resource update patch from a server side, where the game resource update patch includes a necessary resource file update package corresponding to the necessary resource file package and an additional resource file update package corresponding to an additional resource file package, where the additional resource file update package includes an additional resource file update package corresponding to the additional resource file package, the necessary resource file package is a file that is forcibly updated, and the additional resource file update package is a file that is not forcibly updated, so that the additional resource file update package is not directly downloaded to the local but stored on the server side.
Step 406: and acquiring an index patch file, and updating the index file according to the index patch file.
In the embodiment of the application, the game resource update patch further comprises an index patch file, and the index file is updated through the index patch file at the end of each update, so that the change conditions of files in the necessary resource folder and the additional resource folder can be updated into the index file.
Optionally, the user information includes an instruction of the user, rating information of the user, or role information of the user.
In another embodiment of the present application, after the index file is updated according to the index patch file, steps 501 to 504 are further included.
Step 501: and adding the acquired necessary resource file update package and the acquired at least one additional resource file update package to the tail of the file package queue to obtain an updated file package queue.
Step 502: and running the updated file packet queue.
Step 503: and acquiring at least one corresponding additional resource file update sub-package corresponding to the updated user information from the server through the updated index file according to the updated user information.
In the embodiment of the application, a user can select the own updating data volume in the additional resource file package, and can enter the client directly after the update of the necessary resource file package is finished in an extreme case, and an IO system of the game determines to load and update a specific additional resource file update package, for example, a certain additional resource file update package records map information of a certain position in the game, when a player does not enter the region, the additional resource file package is not updated, and when a game program detects an instruction of the player to enter the map of the position or judges that the player is most likely to enter the region through calculation, the additional resource file package is updated.
Step 504: and adding the additional resource file update sub-package corresponding to the updated user information to the tail of the updated file package queue.
According to the method and the device, the index file is updated, only the necessary resource file package is forcibly updated for the game resource file, the additional resource file package can be not forcibly updated, the additional resource file update package is released in a sub-package structure, and meanwhile, the complete game resource update patch is stored on the server for updating of each version, so that the possibility of cross-version updating is generated for the client, and the update data volume of the client and the redundancy of the resource file are reduced.
The file processing method aims to break up the whole into parts, reduce the time for interrupting the game running due to updating or repairing, and automatically carry out selective repairing and updating according to the needs of a user by a system instead of carrying out all repairing or updating as in the prior art when carrying out file repairing and updating, thereby further improving the pertinence and efficiency of repairing or updating.
Corresponding to the above method embodiments, the present specification also provides embodiments of a file processing system, and fig. 6 and 7 show block diagrams of the file processing system according to an embodiment of the present specification. As shown in fig. 6, the document processing system includes:
the obtaining module 601 is configured to obtain a necessary resource file package and an index file from a server, where the necessary resource file package includes multiple necessary resource files.
The obtaining module 601 is further configured to obtain, from the server, at least one additional resource file sub-package corresponding to the additional resource file package according to the user information, where each additional resource file sub-package includes multiple corresponding additional resource files.
And the execution module 602 is configured to generate a file packet queue according to the acquired necessary resource file packet and the additional resource file packet.
The verifying module 603 is configured to verify the necessary resource files and the additional resource files in the file packet queue according to the index file, and mark and damage the additional resource files that fail to be verified.
The first repairing module 604 is configured to run the bundle queue, send an obtaining request to the server when the first additional resource file to be loaded is marked as damaged, and obtain the first additional resource file again according to the index file.
In an embodiment of the present application, the method further includes:
and a second repair module 605 configured to retrieve and overwrite the necessary resource file that failed the verification from the server through the index file.
In an embodiment of the present application, the verification module 603 includes:
and the index unit is configured to acquire index information corresponding to the additional resource file failed in verification in the index file.
And the marking unit is configured to mark the identification field in the index information of the additional resource file with failed verification as not downloaded.
In an embodiment of the present application, the method further includes:
an appending module 606 configured to add the retrieved first additional resource file at the end of the bundle queue and overwrite the first additional resource file marked as corrupted.
In another embodiment of the present application, as shown in fig. 7, the file system of the present application further includes:
a first updating module 701 configured to obtain a necessary resource file update package from the server.
The first updating module 701 is further configured to obtain at least one additional resource file update sub-package in the additional resource file update package from the server according to the user information.
The first updating module 701 is further configured to obtain an index patch file, and update the index file according to the index patch file.
In an embodiment of the present application, further comprising:
a first sorting module 702, configured to add the acquired necessary resource file update package and the acquired at least one additional resource file update package to the end of the file package queue, so as to obtain an updated file package queue.
A running module 705 configured to run the updated bundle queue.
In an embodiment of the present application, further comprising:
a second updating module 703 configured to obtain, according to the updated user information, at least one corresponding additional resource file update package corresponding to the updated user information from the server through the updated index file.
A second sorting module 704 configured to add the additional resource file update package corresponding to the updated user information to the end of the updated file package queue.
Optionally, the user information includes an instruction of the user, rating information of the user, or role information of the user.
An embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, the instructions implement the steps of the file processing method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above-mentioned file processing method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above-mentioned file processing method.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and the practical application, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (20)

1. A file processing method is applied to a client and comprises the following steps:
acquiring a necessary resource file package and an index file from a server, wherein the necessary resource file package comprises a plurality of necessary resource files for maintaining the operation of an application;
acquiring at least one corresponding additional resource file sub-package in the additional resource file package from the server according to the user information, wherein each additional resource file sub-package comprises a plurality of corresponding additional resource files;
generating a file packet queue according to the acquired necessary resource file packet and the acquired additional resource file sub-packet;
checking the necessary resource files and the additional resource files in the file packet queue according to the index file, repairing the necessary resource files which fail to be checked, and marking the additional resource files which fail to be checked to be damaged;
and running the file packet queue, sending an acquisition request to a server under the condition that a first additional resource file to be loaded is marked as damaged and the first additional resource file marked as damaged is determined to be called, acquiring the first additional resource file again according to the index file, adding the acquired first additional resource file at the tail of the file packet queue, and covering the first additional resource file marked as damaged.
2. The method of claim 1, wherein modifying the essential resource file that fails the check comprises:
and the necessary resource file which fails to be checked is retrieved from the server through the index file and covered.
3. The method of claim 1, wherein marking additional resource files that fail the check as corrupt comprises:
acquiring index information corresponding to the additional resource file failed in verification in the index file;
and marking an identification field in the index information of the additional resource file with the failed verification as not downloaded.
4. The method of claim 1, after generating the bundle queue, further comprising:
acquiring a necessary resource file update package from the server;
acquiring at least one additional resource file update sub-packet in the additional resource file update packet from the server according to the user information;
and acquiring an index patch file, and updating the index file according to the index patch file.
5. The method of claim 4, further comprising, after updating the index file according to the index patch file:
adding the acquired necessary resource file update package and the acquired at least one additional resource file update package to the tail of the file package queue to obtain an updated file package queue;
and running the updated file packet queue.
6. The method of claim 5, after running the updated bundle queue, further comprising:
acquiring at least one corresponding additional resource file update sub-package corresponding to the updated user information from the server through the updated index file according to the updated user information;
and adding the additional resource file update sub-package corresponding to the updated user information to the tail of the updated file package queue.
7. The method according to any one of claims 1 or 4-6, wherein the user information comprises an instruction of the user, rating information of the user, or role information of the user.
8. The method of claim 1, wherein checking the essential resource files and the additional resource files in the bundle queue according to the index file comprises:
checking the necessary resource files by adopting an information abstract algorithm;
and checking the additional resource file sub-packets by adopting a 32-bit cyclic redundancy check method or an information summary algorithm.
9. The method of claim 1, wherein, if the first additional resource file to be loaded is marked as corrupted and it is determined that the marked first additional resource file is invoked, the method comprises:
receiving an instruction of a user to read the first additional resource file marked as damaged or determining that the user is about to read the first additional resource file marked as damaged.
10. A document processing system, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is configured to acquire a necessary resource file package and an index file from a server, and the necessary resource file package comprises a plurality of necessary resource files for maintaining the running of an application;
the acquisition module is further configured to acquire at least one corresponding additional resource file sub-package in the additional resource file package from the server according to the user information, wherein each additional resource file sub-package comprises a plurality of corresponding additional resource files;
the execution module is configured to generate a file packet queue according to the acquired necessary resource file packet and the acquired additional resource file packet;
the checking module is configured to check the necessary resource files and the additional resource files in the file packet queue according to the index file, repair the necessary resource files which fail to check, and mark and damage the additional resource files which fail to check;
the first repairing module is configured to run the file packet queue, send an obtaining request to a server under the condition that a first additional resource file to be loaded is marked as damaged and the first additional resource file marked as damaged is determined to be called, re-obtain the first additional resource file according to the index file, add the re-obtained first additional resource file at the tail of the file packet queue, and cover the first additional resource file marked as damaged.
11. The document processing system according to claim 10, further comprising:
and the second repair module is configured to retrieve and cover the necessary resource file which fails to be checked from the server through the index file.
12. The document processing system of claim 10, wherein the verification module comprises:
the index unit is configured to acquire index information corresponding to the additional resource file failed in verification in the index file;
and the marking unit is configured to mark the identification field in the index information of the additional resource file with failed verification as not downloaded.
13. The document processing system of claim 10, further comprising:
a first update module configured to obtain a necessary resource file update package from the server;
the first updating module is further configured to obtain at least one additional resource file updating sub-packet in the additional resource file updating packet from the server according to the user information;
the first updating module is further configured to obtain an index patch file and update the index file according to the index patch file.
14. The document processing system of claim 13, further comprising:
the first sorting module is configured to add the acquired necessary resource file update package and the acquired at least one additional resource file update package to the tail of the file package queue to obtain an updated file package queue;
an execution module configured to execute the updated bundle queue.
15. The document processing system of claim 14, further comprising:
the second updating module is configured to acquire at least one corresponding additional resource file updating sub-package corresponding to the updated user information from the server through the updated index file according to the updated user information;
a second sorting module configured to add the additional resource file update package corresponding to the updated user information to the end of the updated file package queue.
16. The document processing system according to any one of claims 10 or 13 to 15, wherein the user information includes an instruction of a user, rating information of a user, or role information of a user.
17. The document processing system of claim 10, wherein the verification module comprises:
the first checking unit is configured to check the necessary resource file by adopting an information summarization algorithm;
and the second checking unit is configured to check the additional resource file sub-packets by adopting a 32-bit cyclic redundancy check method or an information digest algorithm.
18. The file processing system of claim 10, wherein the first repair module comprises:
and the repair triggering unit is configured to receive an instruction of a user to read the first additional resource file marked with the damage or determine that the user is about to read the first additional resource file marked with the damage.
19. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-9 when executing the instructions.
20. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 9.
CN201910169501.5A 2019-03-06 2019-03-06 File processing method and system, computing device and storage medium Active CN109908585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910169501.5A CN109908585B (en) 2019-03-06 2019-03-06 File processing method and system, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910169501.5A CN109908585B (en) 2019-03-06 2019-03-06 File processing method and system, computing device and storage medium

Publications (2)

Publication Number Publication Date
CN109908585A CN109908585A (en) 2019-06-21
CN109908585B true CN109908585B (en) 2022-12-27

Family

ID=66963565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910169501.5A Active CN109908585B (en) 2019-03-06 2019-03-06 File processing method and system, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN109908585B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297633B (en) * 2019-06-28 2023-05-23 百度在线网络技术(北京)有限公司 Transcoding method, device, equipment and storage medium
CN110908958B (en) * 2019-11-22 2023-11-24 珠海豹趣科技有限公司 File processing method, device, terminal and storage medium
CN112261388B (en) * 2020-09-07 2023-08-01 中国电影器材有限责任公司 Redundancy recovery method, device and system for satellite transmission digital film package
CN113407213B (en) * 2021-06-21 2022-12-23 平安银行股份有限公司 Resource package updating method, device, equipment and storage medium
CN114860295A (en) * 2022-05-09 2022-08-05 维沃移动通信有限公司 Resource file updating method, device, equipment and readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2891999A (en) * 1998-03-03 1999-09-20 Siebel Systems, Inc. Method, apparatus, system, and program product for attaching files and other objects to a partially replicated database
JP2008097757A (en) * 2006-10-13 2008-04-24 Toshiba Corp Reproducing device and reproducing method
CN106326310B (en) * 2015-07-06 2021-05-14 北京壹平台科技有限公司 Resource encryption updating method for mobile phone client software

Also Published As

Publication number Publication date
CN109908585A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN109908585B (en) File processing method and system, computing device and storage medium
CN110058873B (en) Application page updating method, device, equipment and storage medium
CN106815370B (en) Method, device and system for updating resource file
JP5658283B2 (en) Application operating method, apparatus and system
CN103942058B (en) A kind of EMBEDDED AVIONICS method for upgrading software and system
CN107682436A (en) A kind of method, apparatus and equipment of more new file
US20070294685A1 (en) Program upgrade system and method for ota-capable portable device
CN105468393B (en) Module release upgrade method and terminal installation
CN106161336A (en) A kind of information updating method, Apparatus and system
US8549165B2 (en) Processing devices and methods for transmitting and receiving data
CN109062598A (en) A kind of safe OTA upgrade method and system
CN105786538A (en) Software upgrading method and device based on Android system
CN112947983A (en) Application program updating method and device, electronic equipment and storage medium
CN110333876A (en) A kind of data clearing method and control equipment
CN110740188A (en) Mirror image file uploading method, device, equipment and computer readable storage medium
CN108322540A (en) Customized data lead-in method, terminal and computer readable storage medium
CN113961226B (en) Software development kit repairing method, terminal, server and equipment
CN114416135A (en) Internet of things cloud platform remote terminal upgrading system and method
CN106557530B (en) Operation system, data recovery method and device
CN111400771A (en) Target partition checking method and device, storage medium and computer equipment
CN113312073B (en) Installation package file processing method and related device
CN106649081A (en) Method and apparatus for debugging offline package running in client application
CN106326310B (en) Resource encryption updating method for mobile phone client software
CN114928602A (en) Encryption method, decryption method and OTA (over the air) upgrading system
CN108256352B (en) Method, device and terminal for automatically packaging web protection feature library

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Address before: Room 102, Room 202, Room 302, Room 402, Room 327, Room 102, Room 202, Room 329, Room 302, No. 325, Qiandao Ring Road, Tangjiawan Town, High-tech Zone

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant