CN110908958B - File processing method, device, terminal and storage medium - Google Patents

File processing method, device, terminal and storage medium Download PDF

Info

Publication number
CN110908958B
CN110908958B CN201911159013.2A CN201911159013A CN110908958B CN 110908958 B CN110908958 B CN 110908958B CN 201911159013 A CN201911159013 A CN 201911159013A CN 110908958 B CN110908958 B CN 110908958B
Authority
CN
China
Prior art keywords
resource
file
category
package
resource file
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
CN201911159013.2A
Other languages
Chinese (zh)
Other versions
CN110908958A (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 Baoqu Technology Co Ltd
Original Assignee
Zhuhai Baoqu 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 Baoqu Technology Co Ltd filed Critical Zhuhai Baoqu Technology Co Ltd
Priority to CN201911159013.2A priority Critical patent/CN110908958B/en
Publication of CN110908958A publication Critical patent/CN110908958A/en
Application granted granted Critical
Publication of CN110908958B publication Critical patent/CN110908958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a file processing method, a file processing device, a terminal and a storage medium, wherein at least one resource package corresponding to a target application is acquired; the resource package comprises at least one resource file corresponding to each scene in at least one scene associated with the target application; classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category; combining at least one resource file under each category to obtain at least one combined file; compressing the at least one combined file to obtain at least one compressed package; the at least one compressed package is sent to a server so that a client running the target application obtains the at least one compressed package from the server. By adopting the method and the device, the file management efficiency of the application can be improved.

Description

File processing method, device, terminal and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for processing a file.
Background
With the development of internet technology and mobile internet technology, the application of the mobile internet technology is more and more widely applied in the life of people. For example, people can shop online through a shopping application, watch massive videos through a video application, improve their own knowledge reserves through a learning application, and realize entertainment and leisure through a game application. The application can provide a plurality of functions for users to use, and as the functions of the application are increased, files of the application are more and more trivial and complex. Too many files are unfavorable for managing the files of the application, thereby reducing the file management efficiency of the application.
Disclosure of Invention
The embodiment of the invention provides a file processing method, a device, a terminal and a storage medium, which can improve the file management efficiency of an application.
In a first aspect, an embodiment of the present invention provides a file processing method, including:
acquiring at least one resource package corresponding to a target application; the resource package comprises at least one resource file corresponding to each scene in at least one scene associated with the target application;
classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category;
Combining at least one resource file under each category to obtain at least one combined file;
compressing the at least one combined file to obtain at least one compressed package;
the at least one compressed package is sent to a server so that a client running the target application obtains the at least one compressed package from the server.
In a second aspect, an embodiment of the present invention provides a file processing apparatus, including:
the acquisition unit is used for acquiring at least one resource packet corresponding to the target application; the resource package comprises at least one resource file corresponding to each scene in at least one scene associated with the target application;
the processing unit is used for classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category;
the processing unit is further used for carrying out combination processing on at least one resource file under each category to obtain at least one combined file, and carrying out compression processing on the at least one combined file to obtain at least one compression packet;
and the communication unit is used for sending the at least one compressed packet to a server so that the client side running the target application can acquire the at least one compressed packet from the server.
In a third aspect, an embodiment of the present invention provides a terminal, including a processor, an output device, and a memory, where the processor, the output device, and the memory are connected to each other, where the memory is configured to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to perform a method according to the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method according to the first aspect.
In summary, the terminal may obtain at least one resource package corresponding to the target application, and classify the resource file included in each resource package in the at least one resource package to obtain at least one resource file in each category in the at least one category; the terminal can combine at least one resource file under each category to obtain at least one combined file, and compress the at least one combined file to obtain at least one compressed package to be sent to the server, so that the client running the target application can acquire the at least one compressed package from the server, and file management efficiency of the application can be improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a file processing system according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for processing files according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another method for processing a file according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a document processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to solve the foregoing technical problems, an embodiment of the present invention provides a file processing scheme, which may sort resource files by sorting resource files corresponding to a scene, and further merge the sorted resource files, so as to compress the merged files, and obtain a compressed package, and send the compressed package to a server. In addition, the file processing scheme can also have the following advantages: the disk read-write can be greatly reduced, the problems of overlarge network request quantity and network request data quantity can be effectively reduced, the access pressure of a server can be reduced, and the network flow is saved.
The above-mentioned file processing scheme can be applied to the file processing system shown in fig. 1. The file processing system shown in fig. 1 may include a terminal 10, a server 20, and a client 30 running a target application. The terminal 10 includes, but is not limited to, a smart terminal such as a tablet computer, a notebook computer, a desktop computer, and the like. Server 20 may be a server or a cluster of servers. The client 30 includes, but is not limited to, an H5 terminal, an APP terminal, a PC terminal, and a mobile terminal, such as a mobile phone terminal. The server 20 may establish communication with the terminal 10 and the client 30, respectively.
In the file processing system shown in fig. 1, the terminal 10 may obtain at least one resource package corresponding to the target application, and perform classification processing on the resource file included in each resource package in the at least one resource package, to obtain at least one resource file under each category in the at least one category. The resource package may include at least one resource file corresponding to each of at least one scene associated with the target application. The terminal 10 may further perform a merging process on at least one resource file under each category to obtain at least one merged file, and perform a compression process on the at least one merged file to obtain at least one compressed package, so as to send the at least one compressed package to the server 20, so that the client 30 obtains the at least one compressed package from the server 20.
In one application scenario, the target application is a game application and the terminal 10 corresponds to a developer. The terminal 10 is installed with the game development software U3D and the game development engine Laya. The terminal 10 may open a scene directory including at least one resource package corresponding to the target application by Laya. The terminal 10 may obtain at least one resource package corresponding to the target application, and perform classification processing on the resource file included in each resource package in the at least one resource package, to obtain at least one resource file under each category in the at least one category. The terminal 10 may further perform a merging process on at least one resource file under each category to obtain at least one merged file, and perform a compression process on the at least one merged file to obtain at least one compressed packet, so as to send the at least one compressed packet to the server 20. The client 30 may pull down to obtain the at least one resource packet and then decompress the at least one resource packet to be put into memory for use. In addition, the client 30 may modify the source code of the Laya engine of the gaming application to support direct reading of the decompressed data in the internal cache.
In still another application scenario, the terminal 10 may further search at least one initial resource file corresponding to each scenario in at least one scenario associated with the game application through U3D, call a specified plug-in to export at least one initial resource file corresponding to each scenario in the at least one scenario to obtain at least one resource package corresponding to the target application, each resource file corresponds to one initial resource file, and then save at least one resource package corresponding to the target application in the file Jing Mu. In still another scenario, a developer may open the U3D using the terminal 10 and perform a resource file export operation on a resource file of at least one initial resource file corresponding to each of at least one scenario included in the U3D. The terminal 10 may respond to the resource file export operation, call a specified plug-in to export at least one initial resource file corresponding to each scene in the at least one scene, obtain at least one resource package corresponding to the game application, each resource file corresponds to one initial resource file, and save the at least one resource package corresponding to the game application in the field Jing Mu.
Fig. 2 is a schematic flow chart of a file processing method according to an embodiment of the invention. The method can be applied to a terminal. The terminal comprises, but is not limited to, intelligent terminals such as tablet computers, notebook computers, desktop computers and the like. Specifically, the method may include:
s201, at least one resource package corresponding to the target application is obtained.
The target application includes, but is not limited to, an application program, an applet, and the like. The applet refers to an application that can be used without downloading and installing. In one embodiment, the target application may be a game application or a game applet.
In the embodiment of the invention, the terminal can locally acquire at least one resource packet corresponding to the target application.
In one embodiment, the terminal may further obtain at least one resource packet corresponding to the target application from the server. In one embodiment, the terminal may search whether at least one resource packet corresponding to the target application exists locally, and if so, obtain at least one resource packet corresponding to the target application from the local, and if not, obtain at least one resource packet corresponding to the target application from the server.
In one embodiment, the terminal may send a resource packet acquisition instruction server, and the server may return the at least one resource packet to the terminal in response to the resource packet acquisition instruction. In one embodiment, the resource package acquisition instruction may carry scene identification information, such as a scene name, so that the server may find at least one resource package according to the scene identification information.
In one embodiment, the terminal may also obtain the at least one resource package from a file sharing platform, such as a file sharing server. In one embodiment, the terminal may search whether at least one resource packet corresponding to the target application exists locally, if so, obtain at least one resource packet corresponding to the target application from the local, and if not, obtain at least one resource packet corresponding to the target application from the file sharing platform.
In one embodiment, the terminal may send a resource package acquisition instruction to the file sharing platform, and the file sharing platform may return the at least one resource package to the terminal in response to the resource package acquisition instruction. In one embodiment, the resource package acquisition instruction may carry scene identification information, such as a scene name, so that the file sharing platform may find at least one resource package according to the scene identification information.
S202, classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category.
After obtaining at least one resource package corresponding to the target application, the terminal may perform classification processing on the resource files included in the at least one resource package, to obtain at least one resource file under each category in the at least one category. For example, when the at least one resource packet includes m (m is an integer greater than or equal to 1) resource packets, the terminal may perform a classification process on the m resource packets to obtain at least one resource file under each of n (n is an integer greater than or equal to 1) categories.
Wherein the classification process includes, but is not limited to, at least one of the following: classification by scene, classification by resource type, and classification by file type. Several ways of classifying processes suitable for use in embodiments of the present invention will be described in detail below.
In an embodiment, the manner in which the terminal classifies the resource file included in each resource package in the at least one resource package to obtain the at least one resource file in each category in the at least one category may be that the terminal classifies the resource file included in each resource package in the at least one resource package according to a scenario to obtain the at least one resource file in each category in the at least one category included in the resource package. Wherein each category corresponds to a scene, and the scenes corresponding to each category are different. According to scene classification, the classification process is simpler and easier to implement.
For example, assuming that the at least one resource package includes a resource package 1, where the resource package 1 includes at least one resource file corresponding to a scenario 1, the terminal may classify the resource files included in the resource package 1 according to the scenario to obtain at least one resource file in a category 1, where the category 1 corresponds to the scenario 1. If the resource package 1 further includes at least one resource file corresponding to the scene 2, the terminal may classify the resource files included in the resource package 1 according to the scene to obtain at least one resource file in the category 1 and at least one resource file in the category 2.
In an embodiment, the manner in which the terminal classifies the resource file included in each resource package in the at least one resource package to obtain the at least one resource file in each category in the at least one category may be that the terminal classifies the resource file included in each resource package in the at least one resource package according to a resource type to obtain the at least one resource file in each category in the at least one category included in the resource package. Wherein each category corresponds to a resource type, and the resource types corresponding to each category are different. The resource types can be classified into text types, binary types, picture types and other resource types according to the different types of the data content contained in the resource file.
For example, assuming that the at least one resource package includes a resource package 1, the resource package 1 includes at least one resource file corresponding to the scenario 1, the terminal may classify the resource files included in the resource package 1 according to a resource file type, and at least one resource file under the category 3, at least one resource file under the category 4, at least one resource file under the category 5, and so on may be obtained. Wherein, category 3 may correspond to a text category, category 4 may correspond to a binary category, and category 5 may correspond to a picture category.
In one embodiment, the terminal may identify a resource type of the resource file included in each of the at least one resource package, and classify the resource file included in each of the at least one resource package according to the resource type, to obtain at least one resource file under each of at least one class included in the resource package. The identification means includes, but is not limited to, identification by data content or identification by a suffix name carried by the file.
In an embodiment, the manner in which the terminal classifies the resource file included in each resource packet in the at least one resource packet to obtain the at least one resource file in each category in the at least one category may be that the terminal classifies the resource file included in each resource packet in the at least one resource packet according to a scenario to obtain at least one resource file in each first category in at least one first category included in the resource packet; wherein each first category corresponds to a scene, and the scenes corresponding to each first category are different; the terminal classifies at least one resource file under each first category in at least one first category included in the resource package according to the resource type to obtain at least one resource file under each first category included in the resource package.
For example, assuming that the at least one resource package includes a resource package 1, where the resource package 1 includes at least one resource file corresponding to the scene 1 and at least one resource file under the scene 2, the terminal may classify the resource files included in the resource package 1 according to the scene to obtain at least one resource file under the category 1 and at least one resource file under the category 2. Wherein, category 1 corresponds to scene 1 and category 2 corresponds to scene 2. The terminal may classify at least one resource file under the category 1 according to the resource type, to obtain a text class resource file, a binary class resource file, a picture class resource file, and so on under the category 1. And the terminal can classify at least one resource file under the category 2 according to the resource type to obtain a text class resource file, a binary class resource file, a picture class resource file and the like under the category 2.
In an embodiment, the manner in which the terminal classifies the resource file included in each resource package in the at least one resource package to obtain the at least one resource file in each category in the at least one category may be that the terminal classifies the resource file included in each resource package in the at least one resource package according to a file type to obtain the at least one resource file in each category in the at least one category included in the resource package. Wherein each category corresponds to a file type, and the file types corresponding to each category are different. The resource type can be classified into other file types such as json, txt, cfg according to the file format of the resource file.
In an embodiment, the manner in which the terminal classifies the resource file included in each resource packet in the at least one resource packet to obtain the at least one resource file in each category in the at least one category may be that the terminal classifies the resource file included in each resource packet in the at least one resource packet according to a scenario to obtain at least one resource file in each first category in at least one first category included in the resource packet; wherein each first category corresponds to a scene, and the scenes corresponding to each first category are different; and the terminal classifies at least one resource file under each first category in at least one first category included in the resource package according to the file type to obtain at least one resource file under each first category included in the resource package.
S203, merging the at least one resource file under each category to obtain at least one merged file.
The terminal can acquire the file content of at least one resource file under each category, and combine the file content of at least one resource file under each category to obtain the combined file comprising the file content of at least one resource file under the category.
In one embodiment, the terminal may further obtain the merging information of at least one resource file under the category, and record the merging information. Wherein the merge information includes index information for each of the at least one resource file under the category. The merge information may include identification information of the resource file and location information of file contents of the resource file in the merge file. The identification information of the resource file includes, but is not limited to, information for uniquely identifying the resource file such as a name of the resource file. The location information may be, for example, a line number where the file content is located in the merge file. In one embodiment, the merge file may also include scene identification information, such as a scene name.
In one embodiment, the terminal may add the merge information to the merge file or to another file for recording the merge information.
S204, compressing the at least one combined file to obtain at least one compressed package.
In order to reduce the data volume of the file of the target application, the terminal may perform compression processing on the at least one combined file to obtain at least one compressed package.
In an embodiment, the manner in which the terminal compresses the at least one combined file to obtain the at least one compressed package may be that the terminal compresses each combined file in the at least one combined file to obtain the compressed package corresponding to each combined file. The data amount of the file of the target application can be effectively reduced by compressing for each merged file.
In one embodiment, in addition to compressing each of the merged files, the terminal may group at least one merged file to obtain at least one merged file set, and the terminal may compress each of the at least one merged file set.
In one embodiment, the terminal may determine a data amount of each of the at least one merged file, and group the at least one merged file according to the data amount of each merged file to obtain at least one merged file group. The data volume of the combined file group is smaller than the preset data volume.
In one embodiment, the terminal may obtain a call priority of each of the at least one merged file, and group the at least one merged file according to the call priority of each merged file to obtain at least one merged file group. For example, merge files having call priorities that are the same call priority or within the same call priority range may be grouped together.
S205, the at least one compressed packet is sent to a server, so that the client side running the target application obtains the at least one compressed packet from the server.
The terminal may send the at least one compressed packet to a server so that the client running the target application obtains the at least one compressed packet from the server. The server may receive the at least one compressed packet and perform data processing, such as storage processing or local update processing, based on the at least one compressed packet. The manner in which the client obtains the at least one compressed packet from the server may be, for example, obtaining the at least one compressed packet as needed, which is not limited by the embodiment of the present invention.
In the embodiment shown in fig. 3, the terminal may obtain at least one resource package corresponding to the target application, and classify the resource file included in each resource package in the at least one resource package to obtain at least one resource file in each category in the at least one category; the terminal can combine at least one resource file under each category to obtain at least one combined file, and compress the at least one combined file to obtain at least one compressed package, so that the client running the target application can acquire the at least one compressed package from the server, the number of files of the target application and the total data size of the files are effectively reduced, the management process of the files of the target application is more convenient, and the file management efficiency of the target application is improved.
Fig. 3 is a flow chart of another file processing method according to an embodiment of the invention. The method can be applied to a terminal. The terminal comprises, but is not limited to, intelligent terminals such as tablet computers, notebook computers, desktop computers and the like. Specifically, the method may include:
s301, searching at least one initial resource file corresponding to each scene in at least one scene associated with the target application through application development software.
S302, calling a designated plug-in to conduct export processing on at least one initial resource file corresponding to each scene in the at least one scene to obtain at least one resource package corresponding to the target application, wherein each resource file corresponds to one initial resource file.
In the embodiment of the invention, the terminal can search at least one initial resource file corresponding to each scene in at least one scene associated with the target application through application development software, and call a designated plug-in to conduct export processing on at least one initial resource file corresponding to each scene in the at least one scene to obtain at least one resource package corresponding to the target application, wherein each resource file corresponds to one initial resource file.
The designated plug-in refers to a plug-in capable of executing file export operation. The designated plug-in is capable of exporting the initial resource file as a resource file that can be used by the application development engine of the target application. For example, the application development software may be U3D and the application development engine may be Laya.
In one embodiment, the terminal may save at least one resource packet corresponding to the target application to a specified path, such as saving a specified scene directory. Accordingly, the terminal may obtain at least one resource package of the target application from the specified path.
S303, obtaining at least one resource packet corresponding to the target application.
S304, classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category.
S305, merging the at least one resource file under each category to obtain at least one merged file.
S306, compressing the at least one combined file to obtain at least one compressed package.
S307, the at least one compressed packet is sent to a server, so that the client side running the target application obtains the at least one compressed packet from the server.
In step S303 to step S307, refer to the embodiment of fig. 2, and the description of the embodiment of the present invention is omitted here.
It can be seen that, in the embodiment shown in fig. 3, the terminal may search, through the application development software, at least one initial resource file corresponding to each of at least one scene associated with the target application; and calling a designated plug-in to conduct export processing on at least one initial resource file corresponding to each scene in the at least one scene to obtain at least one resource package corresponding to the target application, wherein each resource file corresponds to one initial resource file so as to execute the steps of classifying, merging and compressing the resource files, so that the file management efficiency of the target application can be improved.
Fig. 4 is a schematic structural diagram of a document processing device according to an embodiment of the present invention. The device can be applied to a terminal. Specifically, the apparatus may include:
an obtaining unit 401, configured to obtain at least one resource packet corresponding to a target application; the resource package comprises at least one resource file corresponding to each scene in at least one scene associated with the target application.
And the processing unit 402 is configured to perform classification processing on the resource file included in each of the at least one resource package, so as to obtain at least one resource file in each of at least one category.
The processing unit 402 is further configured to perform a merging process on at least one resource file under each category to obtain at least one merged file, and perform a compression process on the at least one merged file to obtain at least one compressed package.
A communication unit 403, configured to send the at least one compressed packet to a server, so that a client running the target application obtains the at least one compressed packet from the server.
In an alternative embodiment, the processing unit 402 is further configured to search, by using the application development software, at least one initial resource file corresponding to each of at least one scenario associated with the target application; and calling a designated plug-in to conduct export processing on at least one initial resource file corresponding to each scene in the at least one scene to obtain at least one resource package corresponding to the target application, wherein each resource file corresponds to one initial resource file.
In an alternative embodiment, the processing unit 402 classifies the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one class, specifically classifies the resource file included in each of the at least one resource package according to a scene, and obtains at least one resource file in each of at least one class included in the resource package; wherein each category corresponds to a scene, and the scenes corresponding to each category are different.
In an alternative embodiment, the processing unit 402 classifies the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one class, specifically classifies the resource file included in each of the at least one resource package according to a resource type to obtain at least one resource file in each of at least one class included in the resource package; wherein each category corresponds to a resource type, and the resource types corresponding to each category are different.
In an alternative embodiment, the processing unit 402 classifies the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one class, specifically classifies the resource file included in each of the at least one resource package according to a scene, and obtains at least one resource file in each of at least one first class included in the resource package; wherein each first category corresponds to a scene, and the scenes corresponding to each first category are different; and classifying at least one resource file under each first category in at least one first category included in the resource package according to the resource type to obtain at least one resource file under each first category included in the resource package.
In an alternative embodiment, the processing unit 402 performs a merging process on the at least one resource file under each category to obtain at least one merged file, specifically, obtain a file content of the at least one resource file under each category; combining the file content of at least one resource file under each category to obtain a combined file comprising the file content of at least one resource file under the category; acquiring the merging information of at least one resource file under the category, and recording the merging information; the consolidated information includes index information for each of the at least one resource file under the category.
In an alternative embodiment, the processing unit 402 performs compression processing on the at least one combined file to obtain at least one compressed package, specifically, performs compression processing on each combined file in the at least one combined file, to obtain a compressed package corresponding to each combined file.
In the embodiment shown in fig. 4, the file processing device may obtain at least one resource package corresponding to the target application, and classify the resource file included in each resource package in the at least one resource package to obtain at least one resource file in each category in the at least one category; the file processing device can combine at least one resource file under each category to obtain at least one combined file, and compress the at least one combined file to obtain at least one compressed package, so that a client running the target application can acquire the at least one compressed package from the server, the number of files of the target application and the total data size of the files are effectively reduced, the management process of the files of the target application is more convenient, and the file management efficiency of the target application is improved.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal in this embodiment as shown in the figure may include: one or more processors 501; one or more input devices 502, one or more output devices 503, and a memory 504. The processor 501, the input device 502, the output device 503, and the memory 504 described above may be connected by a bus. Wherein the input device 502 is an optional device. The memory 504 is used for storing a computer program comprising program instructions, and the processor 501 is used for executing the program instructions stored by the memory 504. Wherein the processor 501 is configured to invoke the program instruction execution:
acquiring at least one resource package corresponding to a target application; the resource package comprises at least one resource file corresponding to each scene in at least one scene associated with the target application;
classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category;
combining at least one resource file under each category to obtain at least one combined file;
Compressing the at least one combined file to obtain at least one compressed package;
the at least one compressed package is sent to a server via an output device 503 such that the client running the target application obtains the at least one compressed package from the server.
Optionally, the processor 501 is further configured to invoke the program instruction to execute:
searching at least one initial resource file corresponding to each scene in at least one scene associated with the target application through application development software;
and calling a designated plug-in to conduct export processing on at least one initial resource file corresponding to each scene in the at least one scene to obtain at least one resource package corresponding to the target application, wherein each resource file corresponds to one initial resource file.
Optionally, the processor 501 is configured to invoke the program instruction to perform classification processing on the resource file included in each of the at least one resource package, to obtain at least one resource file under each of at least one category, and specifically is configured to perform:
classifying the resource files included in each resource package in the at least one resource package according to scenes to obtain at least one resource file in each category in at least one category included in the resource package; wherein each category corresponds to a scene, and the scenes corresponding to each category are different.
Optionally, the processor 501 is configured to invoke the program instruction to perform classification processing on the resource file included in each of the at least one resource package, to obtain at least one resource file under each of at least one category, and specifically is configured to perform:
classifying the resource files included in each resource package in the at least one resource package according to the resource types to obtain at least one resource file in each category in at least one category included in the resource package; wherein each category corresponds to a resource type, and the resource types corresponding to each category are different.
Optionally, the processor 501 is configured to invoke the program instruction to perform classification processing on the resource file included in each of the at least one resource package, to obtain at least one resource file under each of at least one category, and specifically is configured to perform:
classifying the resource files included in each resource package in the at least one resource package according to scenes to obtain at least one resource file under each first category in at least one first category included in the resource package; wherein each first category corresponds to a scene, and the scenes corresponding to each first category are different;
And classifying at least one resource file under each first category in at least one first category included in the resource package according to the resource type to obtain at least one resource file under each first category included in the resource package.
Optionally, the processor 501 is configured to invoke the program instruction to perform a merging process on at least one resource file under each category to obtain at least one merged file, specifically for performing:
acquiring file content of at least one resource file under each category;
combining the file content of at least one resource file under each category to obtain a combined file comprising the file content of at least one resource file under the category;
acquiring the merging information of at least one resource file under the category, and recording the merging information; the consolidated information includes index information for each of the at least one resource file under the category.
Optionally, the processor 501 is configured to invoke the program instruction to perform compression processing on the at least one merged file to obtain at least one compressed packet, specifically for performing:
And respectively compressing each merged file in the at least one merged file to obtain a compressed package corresponding to each merged file.
The present invention is not limited to the above embodiments, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and these modifications and substitutions are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (14)

1. A document processing method, comprising:
acquiring at least one resource package corresponding to a target application; the resource package comprises at least one resource file corresponding to each scene in at least one scene associated with the target application;
classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category;
acquiring file contents of at least one resource file in each category, and carrying out merging processing on the file contents of the at least one resource file in each category to obtain a merged file comprising the file contents of the at least one resource file in the category;
Acquiring the merging information of at least one resource file under the category, and recording the merging information; the merging information comprises index information of each resource file in at least one resource file under the category, and the index information comprises identification information of the resource file and position information of file content of the resource file in the merging file;
compressing the at least one combined file to obtain at least one compressed package;
the at least one compressed package is sent to a server so that a client running the target application obtains the at least one compressed package from the server.
2. The method according to claim 1, wherein the method further comprises:
searching at least one initial resource file corresponding to each scene in at least one scene associated with the target application through application development software;
and calling a designated plug-in to conduct export processing on at least one initial resource file corresponding to each scene in the at least one scene to obtain at least one resource package corresponding to the target application, wherein each resource file corresponds to one initial resource file.
3. The method of claim 1, wherein the classifying the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one category comprises:
Classifying the resource files included in each resource package in the at least one resource package according to scenes to obtain at least one resource file in each category in at least one category included in the resource package; wherein each category corresponds to a scene, and the scenes corresponding to each category are different.
4. The method of claim 1, wherein the classifying the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one category comprises:
classifying the resource files included in each resource package in the at least one resource package according to the resource types to obtain at least one resource file in each category in at least one category included in the resource package; wherein each category corresponds to a resource type, and the resource types corresponding to each category are different.
5. The method of claim 1, wherein the classifying the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one category comprises:
Classifying the resource files included in each resource package in the at least one resource package according to scenes to obtain at least one resource file under each first category in at least one first category included in the resource package; wherein each first category corresponds to a scene, and the scenes corresponding to each first category are different;
and classifying at least one resource file under each first category in at least one first category included in the resource package according to the resource type to obtain at least one resource file under each first category included in the resource package.
6. The method of claim 1, wherein compressing the at least one merged file to obtain at least one compressed package comprises:
and respectively compressing each merged file in the at least one merged file to obtain a compressed package corresponding to each merged file.
7. A document processing apparatus, comprising:
the acquisition unit is used for acquiring at least one resource packet corresponding to the target application; the resource package comprises at least one resource file corresponding to each scene in at least one scene associated with the target application;
The processing unit is used for classifying the resource files included in each resource package in the at least one resource package to obtain at least one resource file in each category in at least one category;
the processing unit is further used for acquiring file content of at least one resource file under each category; combining the file content of at least one resource file under each category to obtain a combined file comprising the file content of at least one resource file under the category, obtaining the combined information of at least one resource file under the category, and recording the combined information; the merging information comprises index information of each resource file in at least one resource file under the category, and the index information comprises identification information of the resource file and position information of file content of the resource file in the merging file; compressing the at least one combined file to obtain at least one compressed package;
and the communication unit is used for sending the at least one compressed packet to a server so that the client side running the target application can acquire the at least one compressed packet from the server.
8. The apparatus of claim 7, wherein the processing unit is further configured to search, by the application development software, at least one initial resource file corresponding to each of at least one scenario associated with the target application; and calling a designated plug-in to conduct export processing on at least one initial resource file corresponding to each scene in the at least one scene to obtain at least one resource package corresponding to the target application, wherein each resource file corresponds to one initial resource file.
9. The apparatus of claim 7, wherein the processing unit classifies the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one class, specifically classifies the resource file included in each of the at least one resource package according to a scene to obtain at least one resource file in each of at least one class included in the resource package; wherein each category corresponds to a scene, and the scenes corresponding to each category are different.
10. The apparatus of claim 7, wherein the processing unit classifies the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one class, and specifically classifies the resource file included in each of the at least one resource package according to a resource type to obtain at least one resource file in each of at least one class included in the resource package; wherein each category corresponds to a resource type, and the resource types corresponding to each category are different.
11. The apparatus of claim 7, wherein the processing unit classifies the resource file included in each of the at least one resource package to obtain at least one resource file in each of at least one category, specifically classifies the resource file included in each of the at least one resource package according to a scene to obtain at least one resource file in each of at least one first category included in the resource package; wherein each first category corresponds to a scene, and the scenes corresponding to each first category are different; and classifying at least one resource file under each first category in at least one first category included in the resource package according to the resource type to obtain at least one resource file under each first category included in the resource package.
12. The apparatus of claim 7, wherein the processing unit performs compression processing on the at least one merged file to obtain at least one compressed package, and specifically performs compression processing on each merged file in the at least one merged file to obtain a compressed package corresponding to each merged file.
13. A terminal comprising a processor, an output device and a memory, the processor, the output device and the memory being interconnected, wherein the memory is adapted to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-6.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-6.
CN201911159013.2A 2019-11-22 2019-11-22 File processing method, device, terminal and storage medium Active CN110908958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911159013.2A CN110908958B (en) 2019-11-22 2019-11-22 File processing method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911159013.2A CN110908958B (en) 2019-11-22 2019-11-22 File processing method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110908958A CN110908958A (en) 2020-03-24
CN110908958B true CN110908958B (en) 2023-11-24

Family

ID=69819072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911159013.2A Active CN110908958B (en) 2019-11-22 2019-11-22 File processing method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110908958B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108319653A (en) * 2017-12-29 2018-07-24 谷米科技有限公司 Web page resources document handling method and device
CN109908585A (en) * 2019-03-06 2019-06-21 珠海金山网络游戏科技有限公司 A kind of document handling method and system calculate equipment and storage medium
CN109992284A (en) * 2019-03-29 2019-07-09 北京金山安全软件有限公司 Method and device for providing hot update program and electronic equipment
US20190310835A1 (en) * 2017-03-28 2019-10-10 Tencent Technology (Shenzhen) Company Limited Application development method, tool, and device, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190310835A1 (en) * 2017-03-28 2019-10-10 Tencent Technology (Shenzhen) Company Limited Application development method, tool, and device, and storage medium
CN108319653A (en) * 2017-12-29 2018-07-24 谷米科技有限公司 Web page resources document handling method and device
CN109908585A (en) * 2019-03-06 2019-06-21 珠海金山网络游戏科技有限公司 A kind of document handling method and system calculate equipment and storage medium
CN109992284A (en) * 2019-03-29 2019-07-09 北京金山安全软件有限公司 Method and device for providing hot update program and electronic equipment

Also Published As

Publication number Publication date
CN110908958A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
CN112988284B (en) Application program starting method and device, computer equipment and storage medium
CN112559088A (en) Configuration file optimization method, device, server and storage medium
CN113010542B (en) Service data processing method, device, computer equipment and storage medium
CN110505289B (en) File downloading method and device, computer readable medium and wireless communication equipment
CN110908958B (en) File processing method, device, terminal and storage medium
CN109408471B (en) Compressed packet decompression method and device based on matching tree and storage medium
CN108616603B (en) Method and system for synchronizing internal and external network data
US20220191345A1 (en) System and method for determining compression rates for images comprising text
CN115061785A (en) Information issuing method and device, storage medium and server
CN114860295A (en) Resource file updating method, device, equipment and readable storage medium
CN114817160A (en) File decompression method and device, electronic equipment and computer readable storage medium
CN113407339A (en) Resource request feedback method and device, readable storage medium and electronic equipment
CN109992614B (en) Data acquisition method, device and server
CN111008048B (en) File loading method and device and readable storage medium
CN112257106B (en) Data detection method and device
CN104426900B (en) multimedia data acquisition method and system
CN117667668A (en) Application analysis method, device, equipment and storage medium based on application upgrading
CN117194032A (en) Task execution method, device, equipment and storage medium thereof
CN115827574A (en) Method and device for reading video playback data and storage medium
CN117112383A (en) Performance analysis method, device, equipment and storage medium based on artificial intelligence
CN115687067A (en) Application program identification method and related device
CN116700829A (en) Resource data processing method, device, computer equipment and storage medium
CN116303296A (en) Data storage method, device, electronic equipment and medium
CN111611079A (en) Method and device for scheduling server
CN116017069A (en) Software program package loading method and device, computer equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant