CN110908958A - File processing method, device, terminal and storage medium - Google Patents
File processing method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN110908958A CN110908958A CN201911159013.2A CN201911159013A CN110908958A CN 110908958 A CN110908958 A CN 110908958A CN 201911159013 A CN201911159013 A CN 201911159013A CN 110908958 A CN110908958 A CN 110908958A
- Authority
- CN
- China
- Prior art keywords
- resource
- file
- category
- package
- scene
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 11
- 238000000034 method Methods 0.000 claims description 18
- 230000006835 compression Effects 0.000 claims description 10
- 238000007906 compression Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 7
- 238000004891 communication Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/122—File system administration, e.g. details of archiving or snapshots using management policies
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
- G06F16/1744—Redundancy elimination performed by the file system using compression, e.g. sparse files
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a file processing method, a file processing device, a terminal and a storage medium, and at least one resource package corresponding to a target application is obtained; 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 packet in the at least one resource packet to obtain at least one resource file in each category in at least one category; merging the at least one resource file under each category to obtain at least one merged file; compressing the at least one merged file to obtain at least one compressed packet; and sending the at least one compressed packet to a server so that the client running the target application acquires the at least one compressed packet from the server. By adopting the invention, the file management efficiency of the application can be improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a file processing method, an apparatus, a terminal, and a storage medium.
Background
With the development of internet technology and mobile internet technology, the application of the technology in the life of people is more and more extensive. For example, people can shop online through a shopping application, watch a large amount of videos through a video application, improve self knowledge storage through a learning application, and realize entertainment and leisure through a game application. The application can provide multiple functions for users to use, and the files of the application are more and more trivial and various along with the increase of the application functions. The files which are too trivial and numerous are not beneficial to managing the files of the application, and further the file management efficiency of the application is reduced.
Disclosure of Invention
The embodiment of the invention provides a file processing method, a file processing 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 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;
classifying the resource files included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category;
merging the at least one resource file under each category to obtain at least one merged file;
compressing the at least one merged file to obtain at least one compressed packet;
and sending the at least one compressed packet to a server so that the client running the target application acquires the at least one compressed packet from the server.
In a second aspect, an embodiment of the present invention provides a file processing apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring 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;
the processing unit is used for classifying the resource files included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category;
the processing unit is further configured to perform merging processing on the at least one resource file in each category to obtain at least one merged file, and perform compression processing on the at least one merged file to obtain at least one compressed packet;
a communication unit, 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 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 used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, 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 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 in each category in at least one category; the terminal can merge the at least one resource file in each category to obtain at least one merged file, and compress the at least one merged file to obtain at least one compressed packet to be sent to the server, so that the client running the target application can obtain the at least one compressed packet from the server, and the file management efficiency of the application can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a document processing system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a file processing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram illustrating another document processing method according to an embodiment of the present invention;
FIG. 4 is a schematic structural 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 drawings in the embodiments of the present invention.
In order to solve the foregoing technical problem, an embodiment of the present invention provides a file processing scheme, which classifies resource files by sorting the resource files corresponding to scenes, and further merges the classified resource files, so as to compress the merged resource files, obtain a compressed packet, and send the compressed packet to a server. In addition, the file processing scheme can also have the following advantages: the method can greatly reduce disk reading and writing, effectively reduce the problems of the quantity of network requests and overlarge data quantity of the network requests, reduce the access pressure of the server and save network flow.
Among them, the above-mentioned document processing scheme can be applied to the document 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 tablet computer, a notebook computer, a desktop computer, and other intelligent terminals. 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, a terminal 10 may obtain at least one resource package corresponding to a target application, and perform classification processing on 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 resource package may include at least one resource file corresponding to each of at least one scenario associated with the target application. The terminal 10 may further perform merging processing on the at least one resource file in each category to obtain at least one merged file, and perform compression processing 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, so that the client 30 obtains the at least one compressed packet 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 game development software U3D and a game development engine Laya. The terminal 10 may open a scene directory including at least one resource package corresponding to the target application through 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 in each category in at least one category. The terminal 10 may further perform merging processing on the at least one resource file in each category to obtain at least one merged file, and perform compression processing on the at least one merged file to obtain at least one compressed packet, so as to send the compressed packet to the server 20. The client 30 may pull down the at least one resource packet, and then decompress the at least one resource packet into the memory for use. In addition, the client 30 may also modify the source code of the Laya engine of the gaming application to support direct reading of the decompressed data in an internal cache.
In another application scenario, the terminal 10 may further search, through the U3D, at least one initial resource file corresponding to each scene in at least one scene associated with the game application, and invoke a specified plug-in to export the 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, where each resource file corresponds to one initial resource file, and then store the at least one resource package corresponding to the target application in the scene directory. In still another scenario, the developer may open U3D using the terminal 10 and perform a resource file export operation on the resource files of at least one initial resource file corresponding to each scenario in at least one scenario included in U3D. The terminal 10 may respond to the resource file export operation, invoke 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, where each resource file corresponds to one initial resource file, and store the at least one resource package corresponding to the game application in the scene directory.
Fig. 2 is a schematic flow chart of a file processing method according to an embodiment of the present invention. The method may be applied to a terminal. The terminal includes but is not limited to a tablet computer, a notebook computer, a desktop computer and other intelligent terminals. Specifically, the method may include:
s201, obtaining at least one resource packet corresponding to the target application.
The target application includes, but is not limited to, an application program, an applet, and the like. Wherein, the applet is an application that can be used without downloading and installation. 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 package corresponding to the target application from the server. In an embodiment, the terminal may search whether at least one resource packet corresponding to the target application exists locally, if so, obtain the at least one resource packet corresponding to the target application from the local, and if not, obtain the at least one resource packet corresponding to the target application from the server.
In one embodiment, the terminal may send a resource package obtaining instruction server, and the server may return the at least one resource package to the terminal in response to the resource package obtaining instruction. In an embodiment, the resource packet obtaining instruction may carry scene identification information, such as a scene name, so that the server may search for at least one resource packet according to the scene identification information.
In one embodiment, the terminal may further obtain the at least one resource package from a file sharing platform, such as a file sharing server. In an embodiment, the terminal may search whether at least one resource package corresponding to the target application exists locally, if so, obtain the at least one resource package corresponding to the target application from the local, and if not, obtain the at least one resource package 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 an embodiment, the resource package obtaining instruction may carry scene identification information, such as a scene name, so that the file sharing platform may search for at least one resource package according to the scene identification information.
S202, classifying the resource files included in each resource packet in the at least one resource packet 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 classify resource files included in the at least one resource package to obtain at least one resource file in each of 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 classification processing on the m resource packets to obtain at least one resource file in each of n (n is an integer greater than or equal to 1) categories.
Wherein, the classification processing mode includes but is not limited to at least one of the following: classified by scene, by resource type, and by file type. Several ways of classification processing applicable to embodiments of the present invention will be described in detail below.
In an embodiment, the manner of classifying, by the terminal, the resource files included in each resource package of the at least one resource package to obtain the at least one resource file in each category of the at least one category may be that the resource files included in each resource package of the at least one resource package are classified by the terminal according to a scene to obtain the at least one resource file in each category of 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. And classification is carried out according to scenes, so that the classification process is simpler and easier to realize.
For example, assuming that at least one resource package includes a resource package 1, and the resource package 1 includes at least one resource file corresponding to a scene 1, 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 a category 1, where the category 1 corresponds to the scene 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 under the category 1 and at least one resource file under the category 2.
In an embodiment, the manner of classifying, by the terminal, the resource files included in each resource package of the at least one resource package to obtain the at least one resource file in each category of the at least one category may be that the resource files included in each resource package of the at least one resource package are classified by the terminal according to resource types to obtain the at least one resource file in each category of 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 other resource types such as text type, binary type, picture type and the like according to different types of data contents contained in the resource files.
For example, assuming that at least one resource package includes resource package 1, and resource package 1 includes at least one resource file corresponding to scene 1, the terminal may classify the resource files included in resource package 1 according to resource file types, and at least one resource file under category 3, at least one resource file under category 4, at least one resource file under category 5, and so on may be obtained. The category 3 may correspond to a text category, the category 4 may correspond to a binary category, and the category 5 may correspond to a picture category.
In an embodiment, the terminal may identify a resource type of a resource file included in each resource package of the at least one resource package, and classify the resource file included in each resource package of the at least one resource package according to the resource type to obtain at least one resource file in each category of at least one category included in the resource package. Identification means include, but are not limited to, identification by data content, or identification by a suffix name carried by the file.
In an embodiment, the manner that the terminal classifies 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 may be that the terminal classifies the resource file included in each resource package in the at least one resource package according to a scene to obtain at least one resource file in each first category in the 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 the terminal classifies at least one resource file in each first category in at least one first category included in the resource package according to the resource type to obtain the resource file in at least one category in each first category included in the resource package.
For example, assuming that at least one resource package includes a resource package 1, where the resource package 1 includes at least one resource file corresponding to a scene 1 and at least one resource file in a 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 a category 1 and at least one resource file in a category 2. The category 1 corresponds to the scene 1, and the category 2 corresponds to the scene 2. The terminal can classify at least one resource file under the category 1 according to the resource type to obtain a text resource file, a binary resource file, a picture resource file and the like under the category 1. In addition, the terminal can also classify at least one resource file under the category 2 according to the resource type to obtain a text resource file, a binary resource file, a picture resource file and the like under the category 2.
In an embodiment, the manner of classifying, by the terminal, the resource files included in each resource package of the at least one resource package to obtain the at least one resource file in each category of the at least one category may be that the resource files included in each resource package of the at least one resource package are classified by the terminal according to file types to obtain the at least one resource file in each category of 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 divided into json, txt, cfg and other file types according to different file formats of the resource file.
In an embodiment, the manner that the terminal classifies 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 may be that the terminal classifies the resource file included in each resource package in the at least one resource package according to a scene to obtain at least one resource file in each first category in the 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 the terminal classifies at least one resource file in each first category in at least one first category included in the resource package according to the file type to obtain the resource file in at least one category in 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 the at least one resource file in each category and merge the file content of the at least one resource file in each category to obtain a merged file including the file content of the at least one resource file in the category.
In one embodiment, the terminal may further obtain merging information of at least one resource file in the category, and record the merging information. The merging information includes index information of each resource file in at least one resource file in the category. The merge information may include identification information of the resource file and location information of the file content 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 of the file content in the merged 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 merged information to the merged file or to other files for recording the merged information.
S204, compressing the at least one merged file to obtain at least one compressed packet.
In order to reduce the data amount of the file of the target application, the terminal may perform compression processing on the at least one merged file to obtain at least one compressed packet.
In an embodiment, the manner of compressing the at least one merged file by the terminal to obtain the at least one compressed packet may be that the terminal respectively compresses each merged file in the at least one merged file to obtain a compressed packet corresponding to each merged file. And compressing each merged file, so that the data volume of the file of the target application can be effectively reduced.
In an embodiment, in addition to compressing each merged file, the terminal may group at least one merged file to obtain at least one merged file group, and the terminal performs compression processing on each merged file group in the at least one merged file group respectively.
In one embodiment, the terminal may determine a data amount of each merged file in 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 size of the merged file group is smaller than a preset data size.
In an embodiment, the terminal may obtain a call priority of each merged file in 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, merged files with a call priority of the same call priority or within the same call priority range may be grouped together.
S206, the at least one compressed packet is sent to a server, so that the client running the target application acquires the at least one compressed packet from the server.
The terminal may send the at least one compressed packet to the 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 on demand, which is not limited by the embodiment of the present invention.
As can be seen, in the embodiment shown in fig. 3, the terminal 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 in each category in at least one category; the terminal can merge at least one resource file under each category to obtain at least one merged file, compress the at least one merged file to obtain at least one compressed packet, and send the at least one compressed packet to the server, so that the client running the target application can obtain the at least one compressed packet from the server, thereby effectively reducing the number of files of the target application and the total data volume of the files, further facilitating the management process of the files of the target application, and improving the file management efficiency of the target application.
Please refer to fig. 3, which is a flowchart illustrating another file processing method according to an embodiment of the present invention. The method may be applied to a terminal. The terminal includes but is not limited to a tablet computer, a notebook computer, a desktop computer and other intelligent terminals. Specifically, the method may include:
s301, at least one initial resource file corresponding to each scene in at least one scene associated with the target application is searched through the application development software.
S302, calling a designated plug-in to export 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 the application development software, and call the specified plug-in to export the 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 specified plug-in is a plug-in capable of executing file export operation. The specified plug-in is capable of exporting the initial resource file as a resource file that can be used by an application development engine of the target application. For example, the application development software may be U3D and the application development engine is Laya.
In one embodiment, the terminal may store at least one resource package corresponding to the target application under a specified path, such as storing a specified scene directory. Accordingly, the terminal may obtain at least one resource package of the target application from the specified path.
S303, acquiring at least one resource packet corresponding to the target application.
S304, classifying the resource files included in each resource packet in the at least one resource packet 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 merged file to obtain at least one compressed packet.
S307, the at least one compressed packet is sent to a server, so that the client running the target application acquires the at least one compressed packet from the server.
Steps S303 to S307 refer to the embodiment in fig. 2, and the embodiment of the present invention is not described herein again.
As can be seen, 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 scene in at least one scene associated with the target application; and calling a specified plug-in to export 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 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.
Please refer to fig. 4, which is a schematic structural diagram of a file processing apparatus according to an embodiment of the present invention. The apparatus 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.
A processing unit 402, configured to perform classification processing on the resource files included in each resource package of the at least one resource package, so as to obtain at least one resource file in each category of the at least one category.
The processing unit 402 is further configured to perform merging processing on the at least one resource file in each category to obtain at least one merged file, and perform compression processing on the at least one merged file to obtain at least one compressed packet.
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 optional implementation manner, the processing unit 402 is further configured to search, by the application development software, at least one initial resource file corresponding to each scene in at least one scene associated with the target application; and calling a specified plug-in to export 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 optional implementation manner, the processing unit 402 performs classification processing on the resource file included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category, specifically, classifies the resource file included in each resource packet in the at least one resource packet according to a scene to obtain at least one resource file in each category in at least one category included in the resource packet; wherein each category corresponds to a scene, and the scenes corresponding to each category are different.
In an optional implementation manner, the processing unit 402 performs classification processing on the resource file included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category, specifically, classifies the resource file included in each resource packet in the at least one resource packet according to a resource type to obtain at least one resource file in each category in at least one category included in the resource packet; wherein, each category corresponds to a resource type, and the resource types corresponding to each category are different.
In an optional implementation manner, the processing unit 402 performs classification processing on the resource file included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category, specifically, classifies the resource file included in each resource packet in the at least one resource packet according to a scene to obtain at least one resource file in each first category in at least one first category included in the resource packet; 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 the resource file of at least one category under each first category included in the resource package.
In an optional implementation manner, the processing unit 402 performs merging processing on the at least one resource file in each category to obtain at least one merged file, specifically, to obtain file content of the at least one resource file in each category; merging the file contents of the at least one resource file under each category to obtain a merged file comprising the file contents of the 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 merging information includes index information of each resource file in at least one resource file under the category.
In an optional implementation manner, the processing unit 402 performs compression processing on the at least one merged file to obtain at least one compressed packet, specifically, performs compression processing on each merged file in the at least one merged file to obtain a compressed packet corresponding to each merged file.
As can be seen, in the embodiment shown in fig. 4, the file processing apparatus may obtain at least one resource package corresponding to the target application, and perform classification processing on 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 file processing device can merge at least one resource file under each category to obtain at least one merged file, compress the at least one merged file to obtain at least one compressed packet, and send the at least one compressed packet to the server, so that the client running the target application can obtain the at least one compressed packet from the server, thereby effectively reducing the number of files of the target application and the total data volume of the files, further facilitating the management process of the files of the target application, and improving the file management efficiency of the target application.
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 memory 504. The processor 501, the input device 502, the output device 503, and the memory 504 may be connected by a bus. Input device 502 is optional, among other things. The memory 504 is used to store a computer program comprising program instructions and the processor 501 is used to execute the program instructions stored by the memory 504. Wherein the processor 501 is configured to call the program instruction to perform:
acquiring 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;
classifying the resource files included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category;
merging the at least one resource file under each category to obtain at least one merged file;
compressing the at least one merged file to obtain at least one compressed packet;
the at least one compressed packet is sent to the server through the output device 503 so that the client running the target application obtains the at least one compressed packet from the server.
Optionally, the processor 501 is further configured to invoke the program instructions to perform:
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 specified plug-in to export 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 resource packet in the at least one resource packet, so as to obtain at least one resource file in each category in at least one category, and specifically 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 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 resource packet in the at least one resource packet, so as to obtain at least one resource file in each category in at least one category, and specifically to perform:
classifying the resource files included in each resource package in the at least one resource package according to resource types to obtain at least one resource file under 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 resource packet in the at least one resource packet, so as to obtain at least one resource file in each category in at least one category, and specifically 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 first class in at least one first class included in the resource package; 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 the resource file of at least one category under each first category included in the resource package.
Optionally, the processor 501 is configured to invoke the program instruction to perform merging processing on the at least one resource file in each category, so as to obtain at least one merged file, and specifically to perform:
acquiring the file content of at least one resource file under each category;
merging the file contents of the at least one resource file under each category to obtain a merged file comprising the file contents of the 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 merging information includes index information of each resource file in 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, so as to obtain at least one compressed packet, and specifically to perform:
and respectively compressing each merged file in the at least one merged file to obtain a compressed packet corresponding to each merged file.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A file processing method, comprising:
acquiring 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;
classifying the resource files included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category;
merging the at least one resource file under each category to obtain at least one merged file;
compressing the at least one merged file to obtain at least one compressed packet;
and sending the at least one compressed packet to a server so that the client running the target application acquires the at least one compressed packet from the server.
2. The method of claim 1, further comprising:
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 specified plug-in to export 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 according to 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 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 according to 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 resource types to obtain at least one resource file under 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 according to 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 first class in at least one first class included in the resource package; 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 the resource file of at least one category under each first category included in the resource package.
6. The method according to any one of claims 1 to 5, wherein the merging the at least one resource file in each category to obtain at least one merged file comprises:
acquiring the file content of at least one resource file under each category;
merging the file contents of the at least one resource file under each category to obtain a merged file comprising the file contents of the 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 merging information includes index information of each resource file in at least one resource file under the category.
7. The method according to claim 1, wherein the 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 packet corresponding to each merged file.
8. A document processing apparatus, characterized by comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring 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;
the processing unit is used for classifying the resource files included in each resource packet in the at least one resource packet to obtain at least one resource file in each category in at least one category;
the processing unit is further configured to perform merging processing on the at least one resource file in each category to obtain at least one merged file, and perform compression processing on the at least one merged file to obtain at least one compressed packet;
a communication unit, 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.
9. 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 configured 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-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
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 true CN110908958A (en) | 2020-03-24 |
CN110908958B 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)
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 |
-
2019
- 2019-11-22 CN CN201911159013.2A patent/CN110908958B/en active Active
Patent Citations (4)
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 |
---|---|
CN110908958B (en) | 2023-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20130067080A1 (en) | Storage and Communication De-Duplication | |
CN106453572A (en) | Method and system for synchronizing images based on cloud server | |
CN112256772A (en) | Data service method, device and readable storage medium | |
CN113094492A (en) | Comment information display method, comment information processing system, comment information processing device, comment information equipment and storage medium | |
CN109408471B (en) | Compressed packet decompression method and device based on matching tree and storage medium | |
CN114553858A (en) | Resource pre-downloading method, device and equipment | |
CN113010542B (en) | Service data processing method, device, computer equipment and storage medium | |
CN112650804B (en) | Big data access method, device, system and storage medium | |
CN113282590A (en) | Interface joint debugging method and device based on 5G message | |
WO2024078348A1 (en) | Method and apparatus for processing registry operation in application porting environment, and medium | |
CN113297267A (en) | Data caching and task processing method, device, equipment and storage medium | |
CN104363237A (en) | Method and system for processing internet media resource metadata | |
CN110908958B (en) | File processing method, device, terminal 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 | |
CN114817160A (en) | File decompression method and device, electronic equipment and computer readable storage medium | |
CN115061785A (en) | Information issuing method and device, storage medium and server | |
CN111143293B (en) | Metadata acquisition method, device, equipment and computer readable storage medium | |
US20220365959A1 (en) | Multimedia file storage and access method | |
CN113703979A (en) | Resource processing method and device, resource processing equipment and storage medium | |
CN109857719B (en) | Distributed file processing method, device, computer equipment and storage medium | |
US9037805B2 (en) | Managing a region cache | |
CN113407339A (en) | Resource request feedback method and device, readable storage medium and electronic equipment | |
CN112069771A (en) | Method and device for analyzing pictures in PDF (Portable document Format) file | |
CN116257707B (en) | Application release method and device, electronic 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 |