A resource processing method, apparatus, equipment and medium
By packaging resources into AB packages and compressed packages and establishing their corresponding relationships, the problem of AB packages being uneditable is solved, enabling efficient display and editing of resources.
Patent Information
- Application Number
- CN202111624745.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In existing technologies, AssetBundles (AB packages) cannot be reverse exported or edited, resulting in low resource processing efficiency.
The resources to be packaged are packaged into AB packages and compressed packages, and a correspondence is established between the AB packages and the compressed packages. The terminal obtains them and uses them for resource display and editing, respectively.
It improves the efficiency and diversity of resource processing and enables the display and editing of resources.
Smart Images

Figure CN114401012B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a resource processing method, apparatus, device and medium. Background Technology
[0002] In existing technologies, resources can be packaged to facilitate their dissemination and use. Among these, AssetBundle (hereinafter referred to as AB package) is a commonly used resource packaging method, but AB packages cannot be reverse exported or edited.
[0003] Therefore, a more efficient resource processing solution is needed. Summary of the Invention
[0004] This specification provides a resource processing method, apparatus, device, and medium to address the technical problem of how to perform resource processing more efficiently.
[0005] To address the aforementioned technical problems, the embodiments in this specification provide the following technical solutions:
[0006] This specification provides a resource processing method, including:
[0007] Identify the resources to be packaged, and package the resources to be packaged into AB packages and compressed packages;
[0008] Establish a mapping between AB packages and compressed packages so that:
[0009] After obtaining the AB package, the terminal displays the resource through the AB package; or, after obtaining the compressed package, the terminal obtains the resource within the compressed package so that the resource can be edited.
[0010] Optionally, the resources to be packaged include the target resource and the associated resources of the target resource;
[0011] Identify the resources to be packaged, and package the resources to be packaged into a compressed file, including:
[0012] A resource list is established, which stores the storage path and resource identifier of the resource file of the target resource, and also stores the storage path and resource identifier of the resource file of the associated resource;
[0013] Obtain the resource files of the target resource and associated resources, and package the resource files of the target resource and associated resources, the cache files corresponding to the resource identifiers of the target resource and associated resources, and the resource list into a compressed package.
[0014] Optionally, the resources within the compressed package can be retrieved for editing, including:
[0015] The compressed package is decompressed to obtain the resource list within the compressed package and the cache file corresponding to the resource identifier;
[0016] For any target resource, the decompressed resource file of the target resource is moved to the storage path of the resource file of the target resource stored in the resource list; for any associated resource, the decompressed resource file of the associated resource is moved to the storage path of the resource file of the associated resource stored in the resource list; for any resource identifier, the decompressed cache file corresponding to the resource identifier is moved to the storage path of the resource file of the resource corresponding to the resource identifier, so as to edit the resource.
[0017] Optionally, the method further includes encrypting the compressed package.
[0018] Optionally, the method further includes: sending the AB packet and the compressed package to the server, so that the server sends the AB packet or the compressed package to each terminal.
[0019] Optionally, the method further includes:
[0020] If a resource display request is received from the terminal, the AB packet is sent to the terminal.
[0021] or,
[0022] If a resource editing request is received from the terminal, the compressed package is sent to the terminal.
[0023] Optionally, the method further includes:
[0024] After editing the resources, identify the resources to be packaged, and package the resources to be packaged into AB packages and compressed packages;
[0025] Establish a mapping between AB packages and compressed packages so that:
[0026] After obtaining the AB package, the terminal displays the resource through the AB package; or, after obtaining the compressed package, the terminal obtains the resource within the compressed package so that the resource can be edited.
[0027] This specification provides a resource processing apparatus, comprising:
[0028] The packaging module is used to determine the resources to be packaged and package the resources to be packaged into AB packages and compressed packages;
[0029] The application module is used to establish the correspondence between AB packages and compressed packages, so that: after the terminal obtains the AB package, it displays the resource through the AB package; or, after the terminal obtains the compressed package, it obtains the resource within the compressed package so as to edit the resource.
[0030] This specification provides a resource processing device, including:
[0031] At least one processor;
[0032] as well as,
[0033] A memory that is communicatively connected to the at least one processor;
[0034] in,
[0035] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the resource processing method described above.
[0036] This specification provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the resource processing method described above.
[0037] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:
[0038] The above technical solution packages the resources to be packaged into AB packages and compressed packages. AB packages can be used for resource display, while compressed packages can be used for resource editing, thereby improving resource processing efficiency and diversity. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings used in the description of the embodiments of this specification or the prior art will be briefly introduced below. Obviously, the drawings described below are only some of the drawings that may be involved in the embodiments described in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of the execution entity of the resource processing method in the first embodiment of this specification.
[0041] Figure 2 This is a flowchart illustrating the resource processing method in the first embodiment of this specification.
[0042] Figure 3 This is a schematic diagram of the resource processing device in the second embodiment of this specification. Detailed Implementation
[0043] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions of the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described in this specification are merely some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0044] In existing technologies, resources can be packaged to facilitate their dissemination and use. Among these, AssetBundle (hereinafter referred to as AB package) is a commonly used resource packaging method, but AB packages cannot be reverse exported or edited.
[0045] The first embodiment of this specification (hereinafter referred to as "Embodiment 1") provides a resource processing method. The executing entity of Embodiment 1 can be a terminal (including but not limited to mobile phones, computers, tablets, and televisions), a server, an operating system, an application, a resource processing platform, or a resource processing system, etc. That is, the executing entity can be diverse, and can be set, used, or changed as needed. Alternatively, a third-party application can assist the executing entity in executing Embodiment 1. For example... Figure 1 As shown, the resource processing method in Embodiment 1 can be executed by the server, and a corresponding application can be installed on the terminal (held by the user). Data can be transmitted between the terminal or the application and the server. Data can be collected, input, or output, or pages or information can be processed (to the user) through the terminal or the application, thereby assisting the server in executing the resource processing method in Embodiment 1.
[0046] like Figure 2 As shown, the resource processing method provided in Embodiment 1 includes:
[0047] S101: (Executing entity) determines the resources to be packaged, and packages the resources to be packaged into AB packages and compressed packages;
[0048] The executing entity in Example 1 can determine the resources to be packaged. These resources can be data visualization resources or 3D scene resources, and include, but are not limited to, model files, material files, and texture files.
[0049] For example, a user can select an object in a 3D scene (the object can be regarded as a combination of resources). The execution subject of Implementation Example 1 will use the resources that intersect with the selected object or the resources used to construct the selected object as the resources to be packaged.
[0050] For example, when Unity is used as a 3D content creation and operation platform, once an object generated using Unity is selected, the execution entity in Implementation Example 1 can use C# code to call Unity's built-in API to find resources that intersect with the selected object or resources used to build the selected object, and use them as resources to be packaged.
[0051] After determining the resources to be packaged, the execution entity in Implementation Example 1 can package the resources into AB packages and compressed packages.
[0052] In Example 1, the resources to be packaged may include target resources and associated resources of target resources (the associated resources of target resources are hereinafter referred to as "associated resources"). For example, the executing entity in Example 1 may use the resources used to construct the selected object as target resources and the resources that intersect with the selected object as associated resources of target resources.
[0053] The following explains how to package the resources to be packaged into AB packages and compressed packages:
[0054] 1. Compressed files (e.g., ZIP files)
[0055] In Example 1, determining the resources to be packaged and packaging them into a compressed file may include:
[0056] S1011: Establish a resource list, wherein the resource list stores the storage path of the resource file of the target resource and the resource identifier of the target resource, and the resource list also stores the storage path of the resource file of the associated resource and the resource identifier of the associated resource;
[0057] The resource identifier can be a GUID, which is a unique resource ID generated by Unity for each resource and can be used as a resource identifier. The execution entity in Embodiment 1 can create a new JSON file and store the resource list within it, or it can store the JSON file in the root directory (e.g., Unity's Assets root directory).
[0058] S1013: Obtain the resource files of the target resource and associated resources, and package the resource files of the target resource and associated resources, the cache files corresponding to the resource identifiers of the target resource and associated resources, and the resource list into a compressed package.
[0059] Based on the storage path of the resource file of any target resource in the resource list, the execution entity of Implementation Example 1 can obtain the resource file of the target resource; based on the storage path of the resource file of any associated resource in the resource list, the execution entity of Implementation Example 1 can obtain the resource file of the associated resource.
[0060] Based on the resource identifier of any target resource in the resource list, the execution entity of Implementation Example 1 can determine the cache file corresponding to the resource identifier of the target resource; based on the resource identifier of any associated resource in the resource list, the execution entity of Implementation Example 1 can determine the cache file corresponding to the resource identifier of the associated resource.
[0061] In Example 1, the cache file corresponding to the resource identifier can be a meta file (the meta file is the cache file where the GUID is located). The meta file name is in the form of "resource name + suffix + meta suffix". For any resource (including but not limited to target resources or associated resources, the same below), the "resource name" in the meta file name corresponding to the resource identifier of that resource is the name of that resource. Generally, the cache file corresponding to the resource identifier of any resource is stored in the same path as the resource file of that resource.
[0062] The executing entity in Embodiment 1 can package the resource files of the target resource and associated resources, the cache files corresponding to the resource identifiers of the target resource and associated resources, and the resource list into a compressed package. Specifically, the executing entity in Embodiment 1 can call the compression method in the ICSharpCode.SharpZipLib.Zip library to package the resource files of the target resource and associated resources, the cache files corresponding to the resource identifiers of the target resource and associated resources, and the resource list into a compressed package; alternatively, the executing entity in Embodiment 1 can package the resource files of the target resource and associated resources, the cache files corresponding to the resource identifiers of the target resource and associated resources, and the resource list into a compressed package using other methods. Embodiment 1 does not impose any limitations on this method.
[0063] The executing entity in Embodiment 1 can encrypt the compressed package (e.g., set a password for the compressed package) to improve its security. The executing entity in Embodiment 1 can also set the output path (storage path) for the compressed package, thereby storing the encrypted compressed package in the output path.
[0064] II. AB package
[0065] The execution entity in Implementation Example 1 can package the resources to be packaged into an AB package. Specifically, the execution entity in Implementation Example 1 can call Unity's AB package packaging API to package the resources to be packaged into an AB package.
[0066] The execution entity in Example 1 can set the output path of the AB package and store the AB package in the output path.
[0067] For the same batch of resources to be packaged, the output paths of the AB package and the compressed package formed by packaging the resources to be packaged are the same.
[0068] S103: (Executing entity) Establishes a correspondence between the AB package and the compressed package, so that: after the terminal obtains the AB package, when the resource display condition is triggered, the resource is displayed through the AB package; or, after the terminal obtains the compressed package, when the resource editing condition is triggered, the resource in the compressed package is obtained so as to edit the resource.
[0069] For the same batch of resources to be packaged, the executing entity in Implementation Example 1 can establish a correspondence between AB packages and compressed packages formed by packaging the batch of resources to be packaged.
[0070] After packaging the resources to be packaged into AB packages and compressed packages, the resources to be packaged will be referred to as packaged resources below.
[0071] The terminal (the execution entity in Embodiment 1 can also be a terminal, hereinafter the same) can set resource display conditions. These conditions can be user actions that trigger a resource display request on the terminal. Such requests include, but are not limited to, the user clicking a predetermined button on the terminal page, pressing a predetermined key on the terminal, or issuing a predetermined voice signal to the terminal. When a resource display condition is triggered (i.e., the user performs a resource display operation on the terminal), the terminal can send a resource display request to the execution entity in Embodiment 1. The execution entity in Embodiment 1 then sends an AB packet to the terminal based on the resource display request. The user can select the resource to be displayed through the terminal, and the terminal includes the resource to be displayed in the resource display request. The execution entity in Embodiment 1 then sends an AB packet containing the resource to be displayed to the terminal.
[0072] or,
[0073] The terminal can set resource editing conditions. These conditions can include, but are not limited to, a user performing a resource editing request operation on the terminal. Such operations include, but are not limited to, the user clicking a predetermined button on the terminal page, pressing a predetermined key on the terminal, or the user issuing a predetermined voice command. When a resource editing condition is triggered (i.e., the user performs a resource editing operation on the terminal), the terminal can send a resource editing request to the execution entity in Embodiment 1. The execution entity in Embodiment 1 then sends a compressed package to the terminal based on the resource editing request. The user can select the resource to be edited through the terminal, and the terminal includes the resource to be edited in the resource editing request. The execution entity in Embodiment 1 then sends a compressed package containing the resource to be edited to the terminal.
[0074] Additionally, the executing entity in Implementation Example 1 can send AB packages and compressed packages to the server, allowing the server to store the AB packages and compressed packages. For the same batch of resources to be packaged, the server can establish a correspondence between the AB packages and compressed packages formed from that batch of resources. Generally, for the same batch of resources to be packaged, the AB packages and compressed packages formed from that batch of resources are stored in the same path on the server.
[0075] Each terminal can send a resource display request to the server as described above. Based on the resource display request, the server sends an AB packet to each terminal. Users can select the resources to be displayed via their terminals. The terminals include the resources to be displayed in their resource display requests, and the server sends an AB packet containing the resources to be displayed to the terminals. Alternatively, each terminal can send a resource editing request to the server as described above. Based on the resource editing request, the server sends a compressed package to each terminal. Users can select the resources to be edited via their terminals. The terminals include the resources to be edited in their resource editing requests, and the server sends a compressed package containing the resources to be edited to the terminals.
[0076] After the terminal obtains the AB package, it can display the resources within the AB package based on user actions. For example, resources within the AB package can be displayed using WebGL. Since the resources within the AB package can be used to construct objects, objects constructed from those resources can be directly displayed.
[0077] or,
[0078] After the terminal obtains the compressed file, it can retrieve the resources within the compressed file based on user operations, allowing for editing of these resources. This retrieval of resources from the compressed file for editing may include:
[0079] S1031: Decompress the compressed package to obtain the resource list within the compressed package and the cache file corresponding to the resource identifier;
[0080] Decompressing a compressed file can include extracting the files within the compressed file to the root directory (e.g., the Assets root directory in Unity). This can be done by calling the decompression methods in the ICSharpCode.SharpZipLib.Zip library. Alternatively, other methods can be used to decompress the compressed file; this is not limited to the methods described in Example 1.
[0081] As shown above, the resource list is packaged into a compressed file. Therefore, after decompressing the compressed file, the resource list inside the compressed file can be obtained, that is, the decompressed resource list.
[0082] As shown above, the cache files corresponding to the resource identifiers (of the target resource and associated resources) are packaged into a compressed file. Therefore, after decompressing the compressed file, the cache files corresponding to the resource identifiers in the compressed file can be obtained, that is, the decompressed cache files corresponding to the resource identifiers can be obtained.
[0083] S1033: For any target resource, move the decompressed resource file of the target resource to the storage path of the resource file of the target resource stored in the resource list; for any associated resource, move the decompressed resource file of the associated resource to the storage path of the resource file of the associated resource stored in the resource list; for any resource identifier, move the decompressed cache file corresponding to the resource identifier to the storage path of the resource file of the resource identifier, so as to edit the resource.
[0084] Since the decompressed resource list stores the storage path of the resource file of the compressed target resource, for any target resource, the decompressed resource file of the target resource is moved to the "storage path of the resource file of the target resource" stored in the (decompressed) resource list.
[0085] Since the decompressed resource list stores the storage path of the resource files of the compressed associated resources, for any associated resource, the decompressed resource file of that associated resource is moved to the storage path of the resource file of that associated resource stored in the (decompressed) resource list.
[0086] For any resource identifier in the (decompressed) resource list, move the cache file corresponding to that resource identifier to the storage path of the resource file associated with that resource identifier. Specifically, for any target resource identifier in the resource list, move the cache file corresponding to that target resource identifier to the storage path of the target resource's resource file; for any associated resource identifier in the resource list, move the cache file corresponding to that associated resource's resource identifier to the storage path of the associated resource's resource file. For any resource identifier, you can call Unity's API through the resource identifier to move the decompressed cache file corresponding to that resource identifier to the storage path of the resource file associated with that resource identifier.
[0087] By performing the above operations, the decompressed files are restored to their original storage location, allowing for editing of the resources (including but not limited to editing resources through Unity), i.e., editing of the decompressed resource files.
[0088] In Example 1, after the terminal edits the resources, it can send the edited resources to the execution entity of Example 1. The execution entity of Example 1 can re-execute the above steps, namely, determine the resources to be packaged, package the resources to be packaged into AB packages and compressed packages; establish the correspondence between AB packages and compressed packages so that: after the terminal obtains the AB packages, it displays the resources through the AB packages; or, after the terminal obtains the compressed packages, it obtains the resources within the compressed packages so as to edit the resources. That is, the above operations are repeated continuously so that each packaging yields AB packages and compressed packages, satisfying the needs of resource display and resource editing.
[0089] Alternatively, after editing the resources, the terminal can re-execute the above steps: identifying the resources to be packaged, packaging them into AB packages and compressed packages; establishing a correspondence between the AB packages and the compressed packages so that: after obtaining the AB packages, the terminal displays the resources through the AB packages; or, after obtaining the compressed packages, the terminal obtains the resources within the compressed packages for editing. This process is repeated continuously, ensuring that each packaging yields AB packages and compressed packages, satisfying both resource display and editing requirements. In this way, the terminal can also serve as the execution subject of Embodiment 1, allowing the execution subject of Embodiment 1 to change or expand; that is, the execution subject of Embodiment 1 is not limited to a single device.
[0090] In Example 1, each time resources need to be packaged, the resources to be packaged are packaged into AB packages and compressed packages. AB packages can be used for resource display, and compressed packages can be used for resource editing. This allows for both resource display and resource editing, improving resource processing efficiency and diversity.
[0091] like Figure 3 As shown, the second embodiment of this specification provides a resource processing apparatus corresponding to the resource processing method described in Embodiment 1, comprising:
[0092] Packaging module 202 is used to determine the resources to be packaged and package the resources to be packaged into AB packages and compressed packages;
[0093] Application module 204 is used to establish a correspondence between AB packages and compressed packages, so that: after the terminal obtains the AB package, it displays the resource through the AB package; or, after the terminal obtains the compressed package, it obtains the resource within the compressed package so as to edit the resource.
[0094] Optionally, the resources to be packaged include the target resource and the associated resources of the target resource;
[0095] Identify the resources to be packaged, and package the resources to be packaged into a compressed file, including:
[0096] A resource list is established, which stores the storage path and resource identifier of the resource file of the target resource, and also stores the storage path and resource identifier of the resource file of the associated resource;
[0097] Obtain the resource files of the target resource and associated resources, and package the resource files of the target resource and associated resources, the cache files corresponding to the resource identifiers of the target resource and associated resources, and the resource list into a compressed package.
[0098] Optionally, the resources within the compressed package can be retrieved for editing, including:
[0099] The compressed package is decompressed to obtain the resource list within the compressed package and the cache file corresponding to the resource identifier;
[0100] For any target resource, the decompressed resource file of the target resource is moved to the storage path of the resource file of the target resource stored in the resource list; for any associated resource, the decompressed resource file of the associated resource is moved to the storage path of the resource file of the associated resource stored in the resource list; for any resource identifier, the decompressed cache file corresponding to the resource identifier is moved to the storage path of the resource file of the resource corresponding to the resource identifier, so as to edit the resource.
[0101] Optionally, the packaging module 202 is also used to encrypt the compressed package.
[0102] Optionally, the device further includes:
[0103] The sharing module is used to send the AB packet and the compressed packet to the server, so that the server can send the AB packet or the compressed packet to each terminal.
[0104] Optionally, the application module 204 is configured to send the AB package to the terminal if a resource display request is received from the terminal; or, if a resource editing request is received from the terminal, send the compressed package to the terminal.
[0105] Optionally, after editing the resources, the packaging module 202 determines the resources to be packaged and packages the resources to be packaged into AB packages and compressed packages;
[0106] Application module 204 establishes a correspondence between AB packages and compressed packages, so that: after the terminal obtains the AB package, it displays the resource through the AB package; or, after the terminal obtains the compressed package, it obtains the resource within the compressed package so that the resource can be edited.
[0107] The third embodiment of this specification provides a resource processing device, including:
[0108] At least one processor;
[0109] as well as,
[0110] A memory that is communicatively connected to the at least one processor;
[0111] in,
[0112] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the resource processing method described in Embodiment 1.
[0113] The fourth embodiment of this specification provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the resource processing method described in Embodiment 1.
[0114] The above embodiments can be used in combination, and modules with the same name in different embodiments or within the same embodiment can be the same or different modules.
[0115] The foregoing has described specific embodiments of this specification; other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily have to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0116] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer-readable storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0117] The apparatus, device, non-volatile computer-readable storage medium and method provided in the embodiments of this specification are corresponding. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and non-volatile computer storage medium will not be repeated here.
[0118] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0119] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0120] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0121] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0122] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0123] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0124] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0125] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0126] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0127] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0128] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0129] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0130] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0131] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0132] The above description is merely an embodiment of this specification and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. A resource processing method, comprising: Identify the resources to be packaged, and package the resources to be packaged into AB packages and compressed packages; The resources to be packaged include the target resource and the associated resources of the target resource; The process of packaging the resources to be packaged into a compressed package includes: establishing a resource list, wherein the resource list stores the storage path and resource identifier of the resource file of the target resource, and the resource list also stores the storage path and resource identifier of the resource file of the associated resource; obtaining the resource files of the target resource and the associated resource, and packaging the resource files of the target resource and the associated resource, the cache file corresponding to the resource identifier of the target resource and the associated resource, and the resource list into the compressed package; Establish a correspondence between AB packages and compressed packages. If a resource display request is received from the terminal, the AB package is sent to the terminal; or, if a resource editing request is received from the terminal, the compressed package is sent to the terminal, so that: After obtaining the AB package, the terminal displays the resource through the AB package; or, after obtaining the compressed package, the terminal obtains the resources within the compressed package for editing. Obtaining the resources within the compressed package for editing includes: decompressing the compressed package to obtain a resource list and a cache file corresponding to a resource identifier; for any target resource, moving the decompressed resource file of the target resource to the storage path of the resource file in the resource list; for any associated resource, moving the decompressed resource file of the associated resource to the storage path of the resource file in the resource list; for any resource identifier, moving the decompressed cache file corresponding to the resource identifier to the storage path of the resource file corresponding to the resource identifier, restoring the decompressed file to its original storage location for editing.
2. The method of claim 1, further comprising: The compressed file is encrypted.
3. The method of claim 1, further comprising: The AB packet and compressed package are sent to the server so that the server sends the AB packet or compressed package to each terminal.
4. The method according to any one of claims 1 to 3, further comprising: After editing the resources, identify the resources to be packaged, and package the resources to be packaged into AB packages and compressed packages; Establish a mapping between AB packages and compressed packages so that: After obtaining the AB package, the terminal displays the resource through the AB package; or, after obtaining the compressed package, the terminal obtains the resource within the compressed package so that the resource can be edited.
5. A resource processing apparatus, comprising: The packaging module is used to determine the resources to be packaged and package the resources to be packaged into AB packages and compressed packages; The resources to be packaged include the target resource and the associated resources of the target resource; The process of packaging the resources to be packaged into a compressed package includes: establishing a resource list, wherein the resource list stores the storage path and resource identifier of the resource file of the target resource, and the resource list also stores the storage path and resource identifier of the resource file of the associated resource; obtaining the resource files of the target resource and the associated resource, and packaging the resource files of the target resource and the associated resource, the cache file corresponding to the resource identifier of the target resource and the associated resource, and the resource list into the compressed package; The application module is used to establish the correspondence between AB packages and compressed packages, so that: after the terminal obtains the AB package, it displays the resource through the AB package; or, after the terminal obtains the compressed package, it obtains the resources within the compressed package for editing. Obtaining the resources within the compressed package for editing includes: decompressing the compressed package to obtain a resource list and a cache file corresponding to a resource identifier; for any target resource, moving the decompressed resource file of the target resource to the storage path of the resource file of the target resource stored in the resource list; for any associated resource, moving the decompressed resource file of the associated resource to the storage path of the resource file of the associated resource stored in the resource list; for any resource identifier, moving the decompressed cache file corresponding to the resource identifier to the storage path of the resource file of the resource corresponding to the resource identifier, so as to edit the resource. If a resource display request is received from the terminal, the AB packet is sent to the terminal; or, if a resource editing request is received from the terminal, the compressed packet is sent to the terminal.
6. The apparatus according to claim 5, characterized in that, The packaging module is also used to encrypt the compressed package.
7. The apparatus according to claim 5, characterized in that, The device further includes: The sharing module is used to send the AB packet and the compressed packet to the server, so that the server can send the AB packet or the compressed packet to each terminal.
8. The apparatus according to any one of claims 5-7, characterized in that, The packaging module is used to edit the resources, determine the resources to be packaged, and package the resources to be packaged into AB packages and compressed packages; The application module is used to establish a correspondence between AB packages and compressed packages, so that: after the terminal obtains the AB package, it displays the resource through the AB package; or, after the terminal obtains the compressed package, it obtains the resource within the compressed package so that the resource can be edited.
9. A resource processing device, comprising: At least one processor; as well as, A memory that is communicatively connected to the at least one processor; in, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the resource processing method according to any one of claims 1 to 4.
10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the resource processing method of any one of claims 1 to 4.
Citation Information
Patent Citations
3D scene establishing method and system of Internet of Things graphic primitives
CN107170050A