Resource processing method and device, electronic equipment, computer program product and computer readable storage medium

By dividing resources into groups for parallel processing, the problem of low resource processing efficiency is solved and a more efficient resource processing process is achieved.

CN120610784APending Publication Date: 2025-09-09TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410272224.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-08
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

The resource processing efficiency in the prior art is low because the resource processing is performed serially, resulting in low efficiency.

Method used

By dividing the resources to be processed into resource groups and executing resource processing tasks in parallel, it is ensured that the difference in execution time between any two resource processing tasks is less than the difference threshold, and resources are processed in parallel using multiple threads.

Benefits of technology

It improves the efficiency of resource processing, shortens the overall processing time, and enhances the parallelism and efficiency of resource processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120610784A_ABST
    Figure CN120610784A_ABST
Patent Text Reader

Abstract

The invention provides a resource processing method and device, electronic equipment, a computer program product and a computer readable storage medium. The method comprises the following steps: determining a plurality of to-be-processed resources of an application project corresponding to an engine in a target application; based on the resource type of each to-be-processed resource, dividing the plurality of to-be-processed resources into at least one to-be-processed resource group, creating a target number of resource processing tasks based on the at least one to-be-processed resource group, the resource processing tasks being used for processing the to-be-processed resources in the corresponding to-be-processed resource group; and executing the plurality of resource processing tasks in parallel, wherein the difference value of the execution durations of any two resource processing tasks is smaller than a difference value threshold value. According to the invention, the resource processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a resource processing method, device, electronic device, computer program product, and computer-readable storage medium. Background Art

[0002] With the development of Internet technology, the number of resources corresponding to software is increasing, and the amount of data in these resources is also increasing. In related technologies, when multiple resources need to be processed, only one resource can be processed at a time, and the next resource can be processed only after the previous resource is processed. In other words, in related technologies, resource processing is serial, which is inefficient. Summary of the Invention

[0003] Embodiments of the present application provide a resource processing method, apparatus, electronic device, computer program product, and computer-readable storage medium, which can improve the efficiency of processing resources.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] This embodiment of the present application provides a resource processing method, the method comprising:

[0006] Determine multiple resources to be processed in the application project corresponding to the engine in the target application;

[0007] Dividing the plurality of resources to be processed into at least one resource group to be processed based on a resource type of each of the resources to be processed;

[0008] Creating a target number of resource processing tasks based on the at least one to-be-processed resource group, wherein the resource processing tasks are used to process the to-be-processed resources in the corresponding to-be-processed resource group;

[0009] Execute multiple resource processing tasks in parallel; wherein the difference between the execution time of any two resource processing tasks is less than a difference threshold.

[0010] An embodiment of the present application provides a resource processing device, the device comprising:

[0011] A determination module, used to determine a plurality of to-be-processed resources of an application project corresponding to an engine in a target application;

[0012] a partitioning module, configured to partition the plurality of resources to be processed into at least one resource group to be processed based on the resource type of each resource to be processed;

[0013] A creation module, configured to create a target number of resource processing tasks based on the at least one to-be-processed resource group, wherein the resource processing tasks are configured to process the to-be-processed resources in the corresponding to-be-processed resource group;

[0014] An execution module is used to execute multiple resource processing tasks in parallel; wherein the difference between the execution time of any two resource processing tasks is less than a difference threshold.

[0015] In the above scheme, the resource group to be processed includes multiple resources to be processed, and the creation module is also used to divide the multiple resources to be processed included in the resource group to be processed into the target number of resource subgroups to be processed for each resource group to be processed, and the number of resources to be processed in the resource subgroup to be processed is a positive integer; repeatedly perform the following operations until each resource subgroup to be processed is empty: extract one resource subgroup to be processed from each resource group to be processed, and merge the extracted resource subgroups to be processed into a target resource combination; create resource processing tasks corresponding to each target resource combination, and obtain the target number of resource processing tasks.

[0016] In the above scheme, the creation module is also used to perform resource extraction on multiple resources to be processed at least once, and the number of resources to be processed each time the resource is extracted is the target number; the resources to be processed each time the resource is extracted are evenly distributed to the target number of subgroups of resources to be processed; when the number of resources to be processed remaining after performing the resource extraction is less than the target number, the remaining resources to be processed are divided into different subgroups of resources to be processed without duplication.

[0017] In the above solution, the execution module is further configured to create a thread corresponding to each resource processing task; and call the created multiple threads to execute the multiple resource processing tasks in parallel.

[0018] In the above scheme, the execution module is also used to call each of the threads to perform the following processing respectively to execute the corresponding resource processing task: determine at least one resource to be processed corresponding to the resource processing task; for each resource to be processed, obtain the number of dependencies of the resource to be processed on other resources to be processed in the application project; and process the at least one resource to be processed in order of the number of dependencies from small to large.

[0019] In the above scheme, the resource processing task is a resource baking task, and the execution module is also used to execute multiple resource baking tasks in parallel, and perform the following processing for each resource baking task: when the number of resources to be processed corresponding to the resource baking task is multiple, load multiple resources to be processed as current resources to be processed; obtain the first derived data corresponding to the current resources to be processed; based on the first derived data and the current resources to be processed, obtain the target resources to be processed; serialize the target resources to be processed to obtain resource data in the target format.

[0020] In the above scheme, the execution module is also used to search for the first derived data corresponding to the current resource to be processed in the data cache center, and if the first derived data corresponding to the current resource to be processed exists, obtain the first derived data corresponding to the current resource to be processed from the data cache center; if the first derived data corresponding to the current resource to be processed does not exist, generate the first derived data of the current resource to be processed.

[0021] In the above solution, the current resource to be processed is a material, and the device may further include:

[0022] An acquisition module is used to obtain the number of tasks of the resource processing task currently being executed and the number of cores before generating the first derived data of the current resource to be processed; based on the number of tasks and the number of cores, determine the number of shading nodes and create the said number of shading nodes.

[0023] The execution module is further configured to generate first derived data of the currently processed resource through the number of shading nodes.

[0024] In the above scheme, the current resource to be processed depends on other resources to be processed, and the execution module is also used to load the other resources to be processed that the current resource to be processed depends on to obtain dependent resources before obtaining the target resource to be processed based on the first derived data and the current resource to be processed; and obtain the second derived data corresponding to the dependent resource.

[0025] The execution module is further configured to generate a target resource to be processed based on the first derived data, the second derived data, the current resource to be processed, and the dependent resource.

[0026] In the above scheme, the execution module is also used to merge the first derived data into the current resource to be processed to obtain the first resource to be processed; merge the second derived data into the dependent resource to obtain the second resource to be processed; and use the second resource to be processed and the second resource to be processed as the target resource to be processed.

[0027] In the above scheme, the method is applied to the first device, and the acquisition module is also used to obtain performance information of multiple devices before executing multiple resource processing tasks in parallel, and the multiple devices include the first device and at least one second device; based on the performance information of the multiple devices, the resource processing tasks are allocated to each of the devices.

[0028] The execution module is further used to control the multiple devices to execute the multiple resource processing tasks in parallel.

[0029] In the above scheme, the performance information includes a single-core performance indicator and the number of cores; the acquisition module is also used to use the product of the single-core performance indicator and the number of cores as the device performance indicator for each device among the multiple devices; and based on the device performance indicator, allocate the resource processing task to each device.

[0030] In the above scheme, the acquisition module is also used to obtain the sum of the device performance indicators of each of the devices; determine the quotient of the sum and the target number; for each of the devices, based on the device performance indicators of the device and the quotient, determine the number of resource processing tasks corresponding to the device.

[0031] In the above scheme, the determination module is also used to obtain the resource path of the engine for creating the object in the target application, the resource registry for recording resource dependencies, and resource creation information, wherein the resource creation information includes resource information in the process of creating the object in the target application; based on the resource path and the resource registry, determine the first resource to be processed, which is a resource with dependencies required to create the object; based on the resource creation information and the resource registry, determine the second resource to be processed, which is not included in the resource registry; determine the first resource to be processed and the second resource to be processed as resources to be processed.

[0032] An embodiment of the present application provides an electronic device, comprising:

[0033] a memory for storing computer-executable instructions;

[0034] The processor is configured to implement the resource processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0035] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the resource processing method provided in the embodiment of the present application when executed by a processor.

[0036] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, the resource processing method provided in the embodiment of the present application is implemented.

[0037] The embodiments of the present application have the following beneficial effects:

[0038] The embodiment of the present application can determine multiple pending resources of the application project, divide the pending resources according to the resource type, obtain the pending resource group, and then create a target number of resource processing tasks based on the pending resource group, so as to execute the resource processing tasks in parallel. That is to say, after obtaining the pending resources that need to be processed, the embodiment of the present application can create multiple resource processing tasks according to the pending resource group of different resource types, and then execute multiple resource processing tasks in parallel. The resource processing tasks are used to process the pending resources in the corresponding pending resource group, which is equivalent to the embodiment of the present application being able to process the pending resources in parallel. Compared with the serial processing resource method, the efficiency of processing resources can be improved. In addition, the difference in the execution time of any two resource processing tasks in the embodiment of the present application is less than the difference threshold, that is, the time for executing multiple resource processing tasks in parallel is close. In this way, the execution time of multiple resource processing tasks is close to the execution time of a single resource processing task, which greatly shortens the overall processing time of the resource processing task. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a structural diagram of the resource processing system provided in an embodiment of the present application;

[0040] Figure 2 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0041] Figure 3 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 1 ;

[0042] Figure 4 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 2 ;

[0043] Figure 5 is a schematic diagram of information of a first resource to be processed provided in an embodiment of the present application;

[0044] Figure 6 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 3 ;

[0045] Figure 7 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 4 ;

[0046] Figure 8 This is a schematic diagram of creating a resource processing task provided by an embodiment of the present application;

[0047] Figure 9 This is an example of the execution time of the resource processing task provided in the embodiment of the present application. Figure 1 ;

[0048] Figure 10 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 5 ;

[0049] Figure 11 This is a schematic diagram of an execution resource processing task provided by an embodiment of the present application;

[0050] Figure 12 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 6 ;

[0051] Figure 13 is a schematic diagram of the editing interface provided in an embodiment of the present application;

[0052] Figure 14 A schematic diagram of a shading node provided in an embodiment of the present application;

[0053] Figure 15 Schematic diagram of the baking task mode interface provided in an embodiment of the present application;

[0054] Figure 16 This is a flow chart of the engine configuration provided by the embodiment of the present application;

[0055] Figure 17 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 7 ;

[0056] Figure 18 This is a schematic diagram of a device list display interface provided in an embodiment of the present application;

[0057] Figure 19 This is an example of the execution time of the resource processing task provided in the embodiment of the present application. Figure 2 ;

[0058] Figure 20 This is an example of the execution time of the resource processing task provided in the embodiment of the present application. Figure 3 ;

[0059] Figure 21 Schematic diagram of the resource processing method provided in this embodiment of the application Figure 8 ;

[0060] Figure 22 This is a schematic diagram of executing a resource baking task provided by an embodiment of the present application;

[0061] Figure 23 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 9 . DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0063] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0064] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0065] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0066] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0067] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0068] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0069] 1) Unreal Engine (UE): A suite of engine tools designed for developing real-time technologies. It is currently widely used in 3D modeling, rendering, and game development. Its comprehensive tool suite and simple workflow allow developers to quickly modify and review their work, with minimal reliance on code.

[0070] 2) Baking (cook): refers to the process of converting Unreal Engine's .uasset format files into the corresponding platform format.

[0071] 3) Derived Data Cache (DDC): The Unreal Engine's derived data cache is generated by files in the .uasset format and stores derived type data of files in the .uasset format.

[0072] 4) Game shader: A program that can operate on 3D objects and is executed by the Graphics Processing Unit (GPU).

[0073] 5) ShaderCompileWorker (SCW): A node used to perform game shader compilation.

[0074] During the research process, the inventors found that the default resource processing method of the Unreal Engine is serial processing of resources, that is, only one resource is processed at a time, and the next resource is processed only after one resource is processed. The efficiency of serial processing of resources is low.

[0075] In order to improve the efficiency of processing resources, embodiments of the present application provide a resource processing method, apparatus, electronic device, computer program product, and computer-readable storage medium, which can improve the efficiency of processing resources.

[0076] See also Figure 1 , Figure 1 This is a structural diagram of the resource processing system 100 provided in an embodiment of the present application. In order to support a resource processing application, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0077] In some embodiments, when a user needs to perform resource processing, the user can click on the corresponding area in the target application displayed in the graphical interface 410-1, and the terminal 400-1 can obtain the resource processing instruction. The terminal 400-1 can determine the multiple resources to be processed of the application project corresponding to the engine in the target application from the multiple pre-stored resources.

[0078] In some embodiments, after receiving the resource processing instruction, terminal 400-1 may send a resource acquisition instruction to terminal 400-2 and server 200. Based on the resource acquisition instruction, terminal 400-2 and server 200 may send to terminal 400-1 the pre-stored resources to be processed for the application project corresponding to the engine in the target application. After receiving the resources sent by terminal 400-2 and server 200, terminal 400-1 may determine, from the received resources, multiple resources to be processed for the application project corresponding to the engine in the target application.

[0079] After determining the pending resources, terminal 400-1 can further divide the multiple pending resources into at least one pending resource group based on the resource type of each pending resource. Based on the at least one pending resource group, a target number of resource processing tasks are created, each of which is used to process the pending resources in the corresponding pending resource group. Multiple resource processing tasks are executed in parallel, where the difference in execution time between any two resource processing tasks is less than a difference threshold. The execution entity for the above process can also be terminal 400-2 or server 200, which will not be further described here.

[0080] After multiple resource processing tasks are completed, the graphical interface 410-1 can display the execution completion notification, and the user can be informed of the resource processing completion notification. Correspondingly, when the execution subject is the terminal 400-2, the graphical interface 410-2 can display the execution completion notification, and the user can be informed of the resource processing completion notification.

[0081] In some embodiments, a user can pre-set a scheduled resource processing task. When server 200 determines that the resource processing time has reached, it can determine multiple resources to be processed for the application project corresponding to the engine in the target application from the pre-stored resources. In some embodiments, the pre-stored resources include resources sent to server 200 in real time or on a scheduled basis by terminal 400-1 and terminal 400-2.

[0082] After determining the resources to be processed, the server 200 may divide the multiple resources to be processed into at least one resource group to be processed based on the resource type of each resource to be processed, and create a target number of resource processing tasks based on the at least one resource group to be processed.

[0083] Server 200 can then assign pending resource processing tasks to terminal 400-1 and terminal 400-2, allowing terminals 400-1 and 400-2 to execute multiple resource processing tasks in parallel. The resource processing tasks are used to process pending resources in the corresponding pending resource group. After the multiple resource processing tasks are completed, graphical interface 410-1 and graphical interface 410-2 can both display a completion notification, so that the user can be notified of the completion of resource processing.

[0084] In some embodiments, the server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0085] The terminals include terminal 400-1 and terminal 400-2. The terminals can be various types of user terminals such as laptop computers, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), smart phones, intelligent voice interaction devices, smart home appliances, smart speakers, smart watches, smart TVs, vehicle-mounted terminals, aircraft, etc., but are not limited thereto. The terminals (terminal 400-1 and terminal 400-2) and server 200 can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0086] See also Figure 2 , Figure 2 is a structural diagram of an electronic device provided in an embodiment of the present application, Figure 2 The electronic device shown includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in terminal 400-1 and terminal 400-2 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0087] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0088] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0089] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0090] The memory 450 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0091] In some embodiments, the memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0092] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;

[0093] A network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include Bluetooth, Wi-Fi, and Universal Serial Bus (USB);

[0094] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripheral devices and displaying content and information);

[0095] The input processing module 454 is configured to detect one or more user inputs or interactions from one of the one or more input devices 432 and to translate the detected inputs or interactions.

[0096] In some embodiments, the resource processing device provided in the embodiments of the present application can be implemented in software. Figure 2 The resource processing device 455 stored in the memory 450 is shown. This device can be software in the form of a program or plug-in, and includes the following software modules: a determination module 4551, a division module 4552, a creation module 4553, and an execution module 4554. These modules are logical and can be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.

[0097] In other embodiments, the resource processing device provided in the embodiments of the present application can be implemented in hardware. As an example, the resource processing device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the resource processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0098] In some embodiments, the terminal or server can implement the resource processing method provided by the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run; it can also be a small program that can be embedded in any APP, that is, a program that only needs to be downloaded to a browser environment to run. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0099] The following describes the resource processing method provided by the embodiment of the present application. As mentioned above, the electronic device that implements the resource processing method of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution entity of each step will not be repeated below.

[0100] Next, the resource processing method of the embodiment of the present application is described by taking the implementation of the method by a terminal as an example. Figure 3 , Figure 3 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 1 , combined with Figure 3 The steps shown illustrate the resource processing method provided in the embodiment of the present application.

[0101] When a user needs to process resources, they can click the corresponding area in the target application interface displayed on the terminal, and the terminal will receive the resource processing instruction. The click method can be single-click, double-click, etc. The resource processing instruction can also be a voice command, gesture command, etc., which are not specifically limited here. After receiving the instruction, the terminal can execute step 101.

[0102] In step 101, a plurality of to-be-processed resources of an application project corresponding to an engine in a target application are determined.

[0103] Target applications can be applications involving virtual environments, such as gaming applications, video production applications, and applications simulating certain processes. Engines are tools used to develop and implement technologies, such as Unreal Engine, Unity, and CryEngine. Application projects, such as gaming projects, can be developed and updated based on these engines. Resources to be processed are those involved in developing application projects based on these engines.

[0104] In some embodiments, see Figure 4 , Figure 4This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 2 , Figure 3 The illustrated step 101 can be implemented by following steps 1011 to 1014 , which are described in detail below.

[0105] In step 1011, the resource path of the object in the target application created by the engine, the resource registry for recording resource dependencies, and resource creation information are obtained.

[0106] In some embodiments, step 1011 can be implemented by scanning configuration information in the engine, and obtaining at least one resource path for the engine to create an object in the target application based on the configuration information, wherein the resource path is a path corresponding to a resource for which derived data needs to be generated.

[0107] Obtain an asset registry (AssetRegistry) for recording resource dependencies, wherein the asset registry is used to collect information about resources that have not yet been loaded. Obtain resource creation information collected by the detector. The detector can detect the creation operations of all objects in the target application and monitor the corresponding creation process of all objects in the target application. The resource creation information includes resource information during the process of creating objects in the target application. Through step 1011, the accurate resource path, resource registry, and resource creation information can be obtained.

[0108] In step 1012, a first resource to be processed is determined based on the resource path and the resource registration table.

[0109] In related technologies, a resource path includes all resources required to create an object in a target application. However, before resource processing, it is not possible to obtain resources based solely on the resource path. To obtain resources, in some embodiments, the resource path can be scanned through a resource registry to obtain the dependencies (dependencies) of each resource in the resource path, and the resources with dependencies are identified as the first resources to be processed. The first resources to be processed are resources with dependencies required to create an object.

[0110] In some embodiments, after obtaining multiple first resources to be processed, a list including information about the multiple first resources to be processed can be generated. The information about the first resources to be processed includes information such as the path of the first resources to be processed, the resource type of the first resources to be processed, and a globally unique identifier (GUID). The path of the first resource to be processed is the path where the first resources to be processed are stored. The globally unique identifier is a 128-bit binary digital identifier generated by an algorithm that uniquely identifies the first resource to be processed.

[0111] For example, see Figure 5 , Figure 5 This is a schematic diagram of the information of the first resource to be processed provided by the embodiment of the present application. Figure 5 The first resource to be processed includes information of n first resources to be processed, n is greater than or equal to 2, and the first resource to be processed 1 (in Figure 5 The path of the first resource to be processed (not marked in the figure) is " / game / resources / clips / observations / name1", where " / game / resources / clips / observations" are directories at different levels. The resource type of the first resource to be processed 1 is a cutscene sequence, and the globally unique identifier of the first resource to be processed 1 is "string 1". The first resource to be processed n (in Figure 5 The path (not numbered in the example) is " / game / interactive interface / textures / adventure / name n," where " / game / interactive interface / textures / adventure" represents directories at different levels. The resource type of the first resource to be processed, n, is a two-dimensional texture, and the globally unique identifier of the first resource to be processed, n, is "string n." Step 1012 accurately retrieves the first resource to be processed.

[0112] In step 1013, a second resource to be processed is determined based on the resource creation information and the resource registration table.

[0113] After obtaining the resource creation information and resource registry, the resource creation information also includes information such as instances. In order to determine the second resource to be processed, you can first identify whether the object in the resource creation information belongs to a resource. If it does not belong to a resource, you can ignore the object.

[0114] If the object belongs to a resource, the resource to which the object belongs may be compared with a resource registry. If the second resource to be processed is not included in the resource registry, the resource to which the object belongs may be determined as the second resource to be processed.

[0115] The second resource to be processed is not included in the resource registry. The second resource to be processed can be a resource loaded in a constructor. The constructor can be a C++ class or a programming language supported by another engine. It can also be a resource that has dependencies listed in the resource import table but is not included in the resource registry. In other words, the second resource to be processed includes both resources without dependencies and resources with dependencies.

[0116] In some embodiments, the resource import table (ImportTable) records reference information of other resources referenced by the resource, and the reference information may include the path, resource type, globally unique identifier, etc. Through step 1013, resources not included in the resource registry can be accurately obtained.

[0117] In step 1014, the first resource to be processed and the second resource to be processed are determined as resources to be processed.

[0118] After obtaining the first and second pending resources, the first and second pending resources can be identified as pending resources. The first pending resource includes a resource with dependencies required for object creation, and the second pending resource includes at least one of a resource with dependencies not included in the resource registry and a resource without dependencies not included in the resource registry. In this manner, all pending resources required for the object can be identified.

[0119] Through steps 1011 to 1014 , it is possible to analyze all the to-be-processed resources required by the application project before resource processing, thereby analyzing multiple to-be-processed resources of the application project.

[0120] In step 102, a plurality of resources to be processed are divided into at least one resource group to be processed based on the resource type of each resource to be processed.

[0121] Asset types can include textures, animations, audio, meshes, and more. Different game engines may use different types of assets. Below, we'll use Unreal Engine as an example to explain the asset types involved. The types of assets you can create in Unreal Engine include levels, materials, particle systems, cutscene sequences, Blueprint scripts, AI navigation meshes, light maps, and scene lighting.

[0122] Asset types created in other applications and imported into Unreal Engine include static meshes, skeletal meshes, skeletal animations, textures, audio, models (including physics models), and more.

[0123] After obtaining the resources to be processed, the multiple resources to be processed can be divided into at least one resource group to be processed based on the resource type of each resource to be processed. The number of resource groups to be processed should be the same as the number of resource types. In this way, the resource groups to be processed corresponding to different resource types can be accurately obtained.

[0124] In step 103 , a target number of resource processing tasks are created based on at least one resource group to be processed.

[0125] In some embodiments, see Figure 6 , Figure 6 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 3 , Figure 3The illustrated step 103 can be implemented by following steps 1031 to 1033, which are described in detail below.

[0126] In step 1031 , for each to-be-processed resource group, a plurality of to-be-processed resources included in the to-be-processed resource group are divided into a target number of to-be-processed resource subgroups.

[0127] In some embodiments, step 1031 can be implemented in the following manner: for each group of resources to be processed, the number of resources to be processed in the group of resources to be processed can be obtained. When the number of resources to be processed is greater than or equal to the target number, the number of resources to be processed is divided by the target number to obtain the target number of resources, and the target number of resources is a positive integer greater than or equal to 1.

[0128] The target quantity can be a quantity set according to the user's actual usage needs, or it can be a quantity calculated based on the performance information of the device. In some embodiments, the performance information of the device can be input into a pre-trained first quantity prediction model to obtain the target quantity, wherein the performance information of the device can be the performance information of the terminal.

[0129] The first quantity prediction model provided in the embodiment of the present application involves artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0130] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, pre-trained models, operating / interaction systems, and mechatronics. Pre-trained models, also known as large models or foundational models, can, after fine-tuning, be widely applied to downstream tasks across various AI domains.

[0131] The following describes a method for obtaining subgroups of pending resources based on pending resource groups and a target number: When the number of pending resources can evenly divide the target number, for that pending resource group, the target number of pending resources can be divided into each pending resource subgroup. That is, each pending resource subgroup includes the target number of pending resources from that pending resource group. Different pending resource subgroups correspond to different pending resources from that pending resource group, and the number of pending resources in a pending resource subgroup is a positive integer. In this way, accurate division of pending resources can be achieved, resulting in accurate pending resource subgroups.

[0132] If the number of pending resources cannot be divided evenly into the target number, the target number of resources and the remaining number of resources can be obtained. For this pending resource group, the pending resources of the target number of resources can be divided into each pending resource subgroup. Then, for the pending resources of the remaining number of resources, the pending resources can be divided into the pending resource subgroups of the remaining number of resources without duplication. In this way, it is possible to achieve accurate division of the pending resources and obtain accurate pending resource subgroups.

[0133] In some embodiments, the resource subgroups to be processed can be sorted from large to small according to the number of resources to be processed they include. For the remaining number of resources to be processed, the resources to be processed can be divided into resource subgroups to be processed with a smaller number of remaining resources without duplication.

[0134] Each pending resource subgroup includes a number of pending resources from that pending resource group that is greater than or equal to the target number of resources. Different pending resource subgroups correspond to different pending resources from that pending resource group. If a pending resource subgroup includes a number of pending resources from that pending resource group that is greater than the target number of resources, the number of pending resources from that pending resource group is the target number of resources plus 1. The number of pending resources in a pending resource subgroup is a positive integer.

[0135] For example, pending resource group 1 includes 12 pending resources, pending resource group 2 includes 20 pending resources, and the target number is 3. For pending resource group 1, 12 (the number of pending resources) can be divided by 3 (the target number) to obtain 4 (the target number of resources). Each pending resource subgroup can obtain 4 pending resources from pending resource group 1, and each pending resource subgroup has a different pending resource from pending resource group 1.

[0136] For the resource group 2 to be processed, 20 (the number of resources to be processed) can be divided by 3 (the target number), which is equal to 6 with a remainder of 2, that is, 6 (the target number of resources) and 2 (the remaining number of resources) can be obtained. The 6 resources to be processed in the resource group 2 to be processed can be divided into each resource subgroup to be processed. Then, the remaining 2 resources to be processed in the resource group 2 to be processed can be divided into any two resource subgroups to be processed, and the number of resources to be processed from the resource group 2 to be processed included in the resource subgroups to be processed is 6, 7, and 7 respectively. And the corresponding resources to be processed from the resource group 2 to be processed in each resource subgroup to be processed are different. In this way, it is possible to achieve accurate division of resources to be processed and obtain accurate resource subgroups to be processed.

[0137] In some embodiments, for each pending resource group, the number of pending resources in the pending resource group can be obtained. If the number of pending resources is less than a target number, the pending resources can be divided into non-repeated subgroups of pending resources corresponding to the number of pending resources. In this case, the number of pending resources from the pending resource group in each pending resource subgroup is 1 or 0.

[0138] For example, pending resource group 3 includes two pending resources, specifically pending resource 1 and pending resource 2, and pending resource subgroups include three pending resource subgroups, specifically pending resource subgroup 1, pending resource subgroup 2, and pending resource subgroup 3. Pending resource 1 can be divided into pending resource subgroup 1, and pending resource 2 can be divided into pending resource subgroup 2. In this way, pending resource subgroup 1 can include one pending resource 1 from pending resource group 3, pending resource subgroup 2 can include one pending resource 2 from pending resource group 3, and pending resource subgroup 3 does not include any pending resource from pending resource group 3. In this way, precise division of pending resources can be achieved, resulting in precise pending resource subgroups.

[0139] The target pending resource group is defined as a pending resource group whose number of pending resources is greater than or equal to the target number. Each pending resource subgroup includes pending resources corresponding to the target pending resource group. The target pending resource group has the target resource type as its resource type, and each pending resource subgroup includes pending resources of the target resource type.

[0140] For example, there are five pending resource groups, namely, pending resource groups 4 through 8. The number of pending resources included in each of these groups is greater than the target number. Therefore, these groups can be used as the target pending resource groups. Each pending resource subgroup includes pending resources from groups 4 through 8 (the target pending resource groups). This allows for precise division of pending resources and yields precise pending resource subgroups.

[0141] In some embodiments, see Figure 7 , Figure 7 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 4 , Figure 6 The illustrated step 1031 can be implemented by following the steps 10311 to 10313, which are described in detail below.

[0142] In step 10311, resource extraction is performed at least once on the plurality of resources to be processed, and the number of resources to be processed in each resource extraction is the target number;

[0143] In some embodiments, step 10311 can be implemented by performing resource extraction on the multiple resources to be processed included in each resource group to be processed at least once, and the number of resources to be processed in each resource extraction is the target number.

[0144] If the number of pending resources in a pending resource group is less than the target number, the pending resources are divided into different pending resource subgroups without duplication. In this case, the number of pending resources from the pending resource group in each pending resource subgroup is 1 or 0. This approach allows for precise division of pending resources and yields precise pending resource subgroups.

[0145] If the number of pending resources in the pending resource group equals the target number, a resource extraction is performed once for the target number of pending resources, and the number of pending resources extracted is the target number. If the number of pending resources in the pending resource group exceeds the target number, at least one resource extraction is performed for multiple pending resources, and the number of pending resources extracted each time is the target number. This method allows the target number of pending resources to be accurately extracted.

[0146] In step 10312, the resources to be processed in each resource extraction are evenly distributed to the target number of resource subgroups to be processed.

[0147] After extracting the target number of pending resources, the pending resources from each resource extraction can be evenly distributed to the target number of pending resource subgroups. The number of pending resources from the pending resource group in each pending resource subgroup is greater than or equal to the number of resource extractions. Different pending resource subgroups correspond to different pending resources from the pending resource group. This approach allows for precise division of pending resources and yields precise pending resource subgroups.

[0148] In step 10313, when the number of remaining resources to be processed is less than the target number when performing resource extraction, the remaining resources to be processed are divided into different subgroups of resources to be processed without duplication.

[0149] For each pending resource group, when performing resource extraction, if the number of pending resources remaining in the pending resource group is less than the target number, the remaining pending resources are divided into different pending resource subgroups without duplication, and the number of pending resources in each pending resource subgroup from the pending resource group is greater than or equal to the number of resource extractions. Different pending resource subgroups correspond to different pending resources from the pending resource group. This approach allows for precise division of pending resources and the generation of precise pending resource subgroups.

[0150] Repeat the operation corresponding to step 1032 until all the resource subgroups to be processed are empty. The number of times step 1032 is performed is the target number, and the number of target resource combinations that can be obtained through step 1032 is the target number.

[0151] In step 1032, a to-be-processed resource subgroup is extracted from each to-be-processed resource group, and the extracted to-be-processed resource subgroups are merged into a target resource group.

[0152] In some embodiments, step 1032 can be implemented in the following manner: each resource group to be processed includes at least one resource subgroup to be processed, a resource subgroup to be processed is extracted from each resource group to be processed, and the extracted resource subgroups to be processed are merged into a target resource group.

[0153] The target resource combination includes subgroups of pending resources from multiple pending resource groups. Specifically, the target resource combination includes subgroups of pending resources of different resource types, and the difference in the number of resource types included in different target resource combinations is less than a preset type difference threshold. For the same resource type, the difference in the number of pending resources included in different target resource combinations is less than a preset resource difference threshold. This approach allows for accurate target resource combinations to be obtained.

[0154] In step 1033, resource processing tasks corresponding to each target resource combination are created respectively to obtain the target number of resource processing tasks.

[0155] After obtaining resource processing tasks, you can create resource processing tasks corresponding to each target resource combination to obtain the target number of resource processing tasks. In other words, a corresponding resource processing task is created for each target resource combination. The resource processing task is used to process the pending resources in the target resource combination. In this way, resource processing tasks can be created for precise target resource combinations.

[0156] For example, see Figure 8 , Figure 8 This is a schematic diagram of creating a resource processing task provided by an embodiment of the present application. Figure 8 , including three resource groups to be processed, specifically level 801, texture sticker 802 and static mesh 803.

[0157] Level 801 includes three resources to be processed, specifically Level 1, Level 2, and Level 3. Texture Sticker 802 includes four resources to be processed, specifically Texture Sticker 1, Texture Sticker 2, Texture Sticker 3, and Texture Sticker 4. Static Mesh 803 includes two resources to be processed, specifically Static Mesh 1 and Static Mesh 2.

[0158] For level 801, a resource extraction can be performed on the 3 pending resources in level 801. The number of pending resources extracted is 3 (target number). Level 1, level 2, and level 3 can be assigned to different pending resource subgroups ( Figure 8 (not shown), specifically, checkpoint 1 is assigned to subgroup 1 of resources to be processed, checkpoint 2 is assigned to subgroup 2 of resources to be processed, and checkpoint 3 is assigned to subgroup 3 of resources to be processed.

[0159] For texture sticker 802, a resource extraction can be performed on the 4 pending resources in texture sticker 801. The number of pending resources extracted is 3 (target number). Texture sticker 1, texture sticker 2 and texture sticker 3 can be respectively assigned to different pending resource subgroups ( Figure 8 (not shown), specifically, texture sticker 1 is assigned to resource subgroup 4 to be processed, texture sticker 2 is assigned to resource subgroup 5 to be processed, and texture sticker 3 is assigned to resource subgroup 6 to be processed.

[0160] When resource extraction is performed again, there is only one texture sticker 4 left as the resource to be processed, that is, the number of resources to be processed is less than the target number. The resource to be processed 4 can be divided into any subgroup of resources to be processed, for example, the resource to be processed 4 can be divided into subgroup 6 of resources to be processed.

[0161] For static grid 801, when performing resource extraction, static grid 801 only contains two resources to be processed, that is, the number of resources to be processed is less than the target number. Static grid 1 and static grid 2 can be assigned to any two subgroups of resources to be processed. For example, static grid 1 can be assigned to subgroup 7 of resources to be processed, and static grid 2 can be assigned to subgroup 8 of resources to be processed.

[0162] Repeat the following operations until all the resource subgroups to be processed are empty: extract one resource subgroup to be processed from each resource subgroup to be processed, and merge the extracted resource subgroups to be processed into a target resource group.

[0163] There are three merged asset groups: Merged asset group 1 includes level 1, texture sticker 1, and static mesh 1. Merged asset group 2 includes level 2, texture sticker 2, and static mesh 2. Merged asset group 3 includes level 3, texture sticker 3, and texture sticker 4.

[0164] exist Figure 8 In the example, resource processing task 804 can be created based on the merged resource group 1. Resource processing task 804 is used to process level 1, texture sticker 1, and static mesh 1. Resource processing task 805 can be created based on the merged resource group 2. Resource processing task 805 is used to process level 2, texture sticker 2, and static mesh 2. Resource processing task 806 can be created based on the merged resource group 3. Resource processing task 806 is used to process level 3, texture sticker 3, and texture sticker 4. In this way, resource processing tasks can be created for precise target resource combinations.

[0165] In step 104 , multiple resource processing tasks are executed in parallel.

[0166] After obtaining the resource processing task, the resource processing task can be executed in parallel. The resource processing task is created for the target resource combination, and the resources to be processed included in the target resource combination are obtained by dividing the resources to be processed according to resource type and target quantity. The difference in the number of resource types included in different target resource combinations is less than the preset type difference threshold.

[0167] For the same resource type, the difference in the number of to-be-processed resources included in different target resource combinations is less than a preset resource difference threshold. In other words, the resource types of the to-be-processed resources included in different target resource combinations are similar, and for the same resource type, the number of to-be-processed resources is also similar. The difference in the processing duration of different to-be-processed resources of the same resource type is less than a preset duration difference threshold. Based on the above, it can be seen that the difference in the processing duration of the to-be-processed resources in different resource combinations is less than the preset difference threshold. In other words, the execution duration of different resource processing tasks is less than the difference threshold, that is, the difference in the execution duration of any two resource processing tasks is less than the difference threshold.

[0168] See also Figure 9 , Figure 9 This is an example of the execution time of the resource processing task provided in the embodiment of the present application. Figure 1 ,exist Figure 9 There are 15 resource processing tasks, specifically resource processing task 1 to resource processing task 15, and the difference threshold is 40 seconds. Figure 9 The difference in execution time between any two resource processing tasks among resource processing tasks 1 to resource processing tasks 15 shown in FIG is less than 40 seconds.

[0169] The following describes a method for executing multiple resource processing tasks in parallel from the perspective of the order in which the tasks to be processed are processed. In some embodiments, see Figure 10 , Figure 10 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 5 , Figure 3 The illustrated step 104 can be implemented by following steps 1041A to 1042A, which are described in detail below.

[0170] In step 1041A, for each resource processing task, a thread corresponding to the resource processing task is created.

[0171] In some embodiments, after obtaining a target number of resource processing tasks, multiple threads corresponding to each resource processing task may be created. Each resource processing task may have multiple threads corresponding to it, and the number of threads may be set based on the user's actual usage requirements and the performance of the terminal. In this way, threads corresponding to resource processing tasks can be created.

[0172] In step 1042A, the created multiple threads are called to execute multiple resource processing tasks in parallel.

[0173] After creating a thread corresponding to each resource processing task, multiple resource processing tasks can be executed in parallel through the thread, that is, calling the created multiple threads to execute multiple resource processing tasks in parallel. In some embodiments, each thread is called to perform the following processing respectively to execute the corresponding resource processing task.

[0174] For each resource processing task, at least one to-be-processed resource corresponding to the resource processing task is determined through multiple threads corresponding to the resource processing task. In some embodiments, there is no corresponding relationship between the number of threads and the number of resources to be processed. Multiple threads can process one to-be-processed resource or multiple to-be-processed resources, which can be determined based on actual usage.

[0175] For each resource to be processed, the number of dependencies of the resource to be processed on other resources to be processed in the application project can be obtained. When the dependency number is 0, the resource to be processed is a resource with no dependency. When the dependency number is greater than 0 and less than the first preset dependency threshold, the resource to be processed is a low-dependency resource. When the dependency number is greater than or equal to the first preset dependency threshold and less than the second preset dependency threshold, the resource to be processed is a resource with a large number of dependencies (high-dependency resources), wherein the second preset dependency threshold is greater than the first preset dependency resource.

[0176] In some embodiments, the resource registry records the number of dependencies of the pending resource on other pending resources. Therefore, the dependency number can be obtained from the resource registry. For pending resources not included in the resource registry, the detector can obtain the resource list recorded in the import table, and the dependency number can be obtained based on the resource list. In this way, the accurate dependency number can be obtained.

[0177] After obtaining the dependency number, at least one resource to be processed may be processed in ascending order of dependency number. After processing each resource to be processed, a corresponding processing result may be generated and stored in a pre-set storage address.

[0178] In the process of parallel processing of resource processing tasks, the independent resources to be processed can be processed first, so that the processing results of the independent resources to be processed can be stored in the storage address. Then, when executing the low-dependency resources to be processed or the high-dependency resources to be processed, the resources on which the low-dependency resources to be processed depend or the resources on which the high-dependency resources to be processed depend do not need to be processed again. Instead, the corresponding processing results are obtained from the storage address to realize the reuse of the processing results, which can speed up the execution time of the resource processing task and improve the efficiency of executing the resource processing task, that is, it can improve the processing efficiency of processing the resources to be processed.

[0179] For example, resource 3 to be processed is an independent resource to be processed, and resource 4 to be processed depends on resource 3 to be processed. Resource 3 to be processed can be processed first, and after processing resource 3, processing result 3 can be obtained and stored in a preset storage address.

[0180] After the processing of pending resource 3 is completed, the processing resource 4 with a smaller number of dependencies can be executed. When processing resource 4, since processing resource 4 depends on resource 3, the related art requires processing resource 3 and resource 4 at the same time. However, in this application, only resource 4 can be processed to obtain processing result 4, which is stored in the storage address. Then, processing result 3 is obtained according to the storage address, and processing result 3 and processing result 4 are merged to complete the processing of resource 4 without processing resource 3 again. In this way, the processing efficiency of processing resources to be processed can be improved.

[0181] In some embodiments, for each resource processing task, after determining at least one to-be-processed resource corresponding to the resource processing task, if the resource processing task includes only one to-be-processed resource, the to-be-processed resource may be processed.

[0182] If a resource processing task includes multiple pending resources, you can split the pending resources corresponding to the resource processing task by resource type to obtain multiple task queues. After obtaining the task queues, you can obtain the number of dependencies that the pending resource has on other pending resources in the application project and sort the task queues by the number of dependencies.

[0183] In some embodiments, the task queues are arranged in ascending order according to the total number of dependencies included in the task queues. For each task queue, the corresponding pending resources in the task queue are arranged in ascending order according to the number of dependencies. Then, the corresponding pending resources can be processed according to the sorted task queues. In this way, the processing efficiency of processing pending resources can be improved.

[0184] For example, see Figure 11 , Figure 11 This is a schematic diagram of executing a resource processing task provided by an embodiment of the present application. The resource processing task 1106 includes multiple resources to be processed. Figure 11 Level 4, texture patch shown Figure 5 , Static Mesh 3, Level 5, Texture Figure 6 , Static Meshes 4, Skeletal Networks 1, and Animation Sequences 1.

[0185] The multiple resources to be processed included in the resource processing task 1106 are divided according to resource types to obtain multiple task queues. Figure 11Only task queue 1101 , task queue 1102 , task queue 1103 , task queue 1104 , and task queue 1105 are shown.

[0186] Arrange the task queues in ascending order according to the total number of dependencies included in the task queues, that is, sort them in the order of no dependency before low dependency, and low dependency before a large number of dependencies. Correspondingly, the arrangement order is task queue 1101 before task queue 1102, task queue 1102 before task queue 1103, task queue 1103 before task queue 1104, and task queue 1104 before task queue 1105.

[0187] For task queue 1101, the texture in task queue 1101 Figure 5 , texture stickers Figure 6 The other texture maps are all non-dependent resources and can be randomly arranged in order. Regarding task queue 1102, Static Mesh 3, Static Mesh 4, and other Static Meshes in task queue 1102 can be sorted by the number of dependencies. Static Mesh 3's dependency count is less than Static Mesh 4's, so Static Mesh 3 comes before Static Mesh 4. Static Mesh 4's dependency count is less than the dependency counts of other Static Meshes, so Static Mesh 4 comes before other Static Meshes.

[0188] For task queue 1103, skeletal network 1 and other skeletal networks in task queue 1103 can be sorted according to the number of dependencies. The number of dependencies of skeletal network 1 is smaller than the number of dependencies of other skeletal networks, and skeletal network 1 is before other skeletal networks.

[0189] For task queue 1104 , animation sequence 1 and other animation sequences in task queue 1104 may be sorted according to dependency quantity. The dependency quantity of animation sequence 1 is smaller than the dependency quantities of other animation sequences, and animation sequence 1 is before other animation sequences.

[0190] Regarding task queue 1105, level 4, level 5, and other levels in task queue 1105 can be sorted by dependency count. Level 4 has a smaller dependency count than level 5, so level 4 comes before level 5. Level 5 has a smaller dependency count than the other levels, so level 4 comes before the other levels. This allows resources to be accurately sorted by dependency count in resource processing tasks. The corresponding resources can then be processed according to the sorted task queue. This improves the efficiency of processing resources.

[0191] In some embodiments, to ensure parallel execution of resource processing tasks, each resource processing task is disabled from generating common outputs such as boot derived data (bootDDC), resource registry, and overall shader. Furthermore, the working directories and outputs of the processes corresponding to each resource processing task are isolated from each other.

[0192] Through step 1041A to step 1042A, multiple resources to be processed can be processed in parallel, which can improve the processing efficiency of the resources to be processed.

[0193] The following describes a solution for executing multiple resource baking tasks in parallel when the resource processing task is a resource baking task. Figure 12 , Figure 12 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 6 , Figure 3 The illustrated step 104 can be implemented by following steps 1041B to 1044B, which are described in detail below.

[0194] Execute multiple resource baking tasks in parallel, and perform the following processing for each resource baking task, that is, execute multiple resource baking tasks in parallel, and perform the processing corresponding to step 1041B to step 1044B for each resource baking task.

[0195] In step 1041B, when there are multiple resources to be processed corresponding to the resource baking task, multiple resources to be processed are loaded as current resources to be processed.

[0196] In some embodiments, step 1041B may be implemented by creating a thread corresponding to each resource baking task. When the number of resources to be processed corresponding to the resource baking task is 1, the resource to be processed may be processed by the thread.

[0197] When there are multiple pending resources corresponding to a resource baking task, at least one pending resource can be loaded as the current pending resource. When loading one current pending resource, the current pending resource is the resource with the smallest number of dependencies among the multiple pending resources. When loading multiple current pending resources, the current pending resource is the resource with the smallest number of dependencies among the multiple pending resources. This method allows you to obtain the exact current pending resource, and when there are multiple current pending resources, you can load resources in batches.

[0198] In some embodiments, in response to an editing operation triggered by an editing interface based on a resource baking task, the target quantity and the loading quantity can be obtained, wherein the loading quantity is the quantity of the currently processed resources to be loaded. For example, see Figure 13, Figure 13 This is a schematic diagram of the editing interface provided by the embodiment of the present application. Figure 13 In response to the selection operation for the scheduler 1303, the multi-process baking scheduler can be selected. The scheduler is used to schedule resource processing tasks periodically or non-periodically. In response to the input operation for the process number 1302, the target number can be obtained. One process corresponds to one resource processing task. Figure 13 In this example, 30 processes, or 30 resource processing tasks, can be created. In response to an input operation for the number of resources processed per frame 1301, a loading quantity can be obtained. The loading quantity is the number of resources currently pending for processing per frame. In this way, a target quantity and a loading quantity that meet the user's actual usage needs can be obtained. The target quantity can be used to create a resource processing task, and the loading quantity is used to load the corresponding pending resources in the resource processing task after the resource processing task is created.

[0199] In some embodiments, when the current resource to be processed depends on other resources to be processed, the other resources to be processed that the current resource to be processed depends on are loaded to obtain the dependent resources. That is to say, when the current resource to be processed depends on other resources to be processed, both the current resource to be processed and its corresponding dependent resources are loaded. In this way, the current resource to be processed and its corresponding dependent resources can be accurately loaded.

[0200] In step 1042B, first derived data corresponding to the current resource to be processed is obtained.

[0201] In some embodiments, step 1042B may be implemented by searching a data cache center for first derived data corresponding to the current resource to be processed, and if the first derived data corresponding to the current resource to be processed exists, obtaining the first derived data corresponding to the current resource to be processed from the data cache center. If the first derived data corresponding to the current resource to be processed does not exist, generating the first derived data for the current resource to be processed.

[0202] In some embodiments, when the current resource to be processed is a non-dependent resource, that is, when the current resource to be processed does not depend on other resources to be processed, the first derived data corresponding to the current resource to be processed can be searched in the data cache center. If the first derived data corresponding to the current resource to be processed does not exist, it means that the first derived data corresponding to the current resource to be processed has not been generated. Therefore, the first derived data of the current resource to be processed can be generated and stored in the data cache center.

[0203] If the first derived data corresponding to the resource to be processed currently exists, it indicates that the first derived data corresponding to the resource to be processed currently has already been generated. Therefore, the first derived data corresponding to the resource to be processed currently can be obtained from the data cache center. In this way, derived data can be reused without having to generate derived data repeatedly.

[0204] In some embodiments, when the current resource to be processed depends on other resources to be processed, the data cache center may be searched for first derived data corresponding to the current resource to be processed, and second derived data corresponding to the dependent resources.

[0205] When there is first derived data corresponding to the currently processed resource and second derived data corresponding to the dependent resource, the first derived data corresponding to the currently processed resource and the second derived data corresponding to the dependent resource can be obtained from the data cache center.

[0206] When there is no first derived data corresponding to the current resource to be processed, and there is second derived data corresponding to the dependent resource, the second derived data corresponding to the dependent resource can be obtained from the data cache center, and the first derived data of the current resource to be processed can be generated, and the generated first derived data can be stored in the data cache center.

[0207] If there is first derived data corresponding to the current resource to be processed, but no second derived data corresponding to the dependent resource exists, the first derived data of the current resource to be processed can be obtained from the data cache center, and second derived data corresponding to the dependent resource can be generated, and the generated second derived data can be stored in the data cache center. Since the order of processing the resources to be processed in the embodiment of the present application is sorted in ascending order of the number of dependencies, and the number of dependencies of the dependent resource is less than the number of dependencies of the current resource to be processed, the probability of the first derived data corresponding to the current resource to be processed and the second derived data corresponding to the dependent resource existing is low, except for situations such as data loss.

[0208] If there is no first derived data corresponding to the currently processed resource and no second derived data corresponding to the dependent resource, the first derived data for the currently processed resource and the second derived data corresponding to the dependent resource can be generated, and the generated first derived data and second derived data can be stored in the data cache center. This allows for reuse of derived data without the need for repeated generation of derived data. Furthermore, when batch loading the currently processed resources, step 1042B can be used to obtain the first derived data in batches.

[0209] In some embodiments, when the resource currently to be processed is a material, the material is an independent resource, that is, the material does not depend on other resources to be processed. Therefore, for the material, the number of tasks of the resource processing task currently executed by the terminal and the number of cores can be obtained, where the number of tasks can be less than or equal to the target number. The number of cores is the number of cores of the central processing unit (CPU).

[0210] After obtaining the number of tasks and the number of cores, the number of shading nodes can be determined based on the number of tasks and the number of cores. In some embodiments, the difference to be used is obtained by subtracting 3 from the number of cores, and the quotient of the difference to be used and the number of tasks is used as the number of shading nodes. The number of shading nodes is the number of shading nodes corresponding to each resource processing task.

[0211] In some embodiments, a maximum value and a minimum value of shading nodes can be set. When the number of shading nodes is greater than the maximum value of shading nodes, the maximum value of shading nodes is used as the number of shading nodes. When the number of shading nodes is less than the minimum value of shading nodes, the minimum value of shading nodes is used as the number of shading nodes. In this way, the number of shading nodes can be limited.

[0212] See also Figure 14 , Figure 14 A schematic diagram of a coloring node provided in an embodiment of the present application. Figure 14 14 shows resource processing task 1401 and resource processing task 1402. Each of resource processing task 1401 and resource processing task 1402 corresponds to four shading nodes. Resource processing task 1401 corresponds to shading nodes 1 through 4. Resource processing task 1402 corresponds to shading nodes 5 through 8. Information is data generated by the shading nodes during their operation.

[0213] For materials, after creating a shading node, the first derived data of the currently processed resource can be generated through a certain number of shading nodes. In this way, the first derived data corresponding to the material can be generated. In some embodiments, in order to further improve the efficiency of generating the first derived data corresponding to the material, the number of tasks corresponding to a single shading node (JobBatchSize) can also be adjusted. In this way, the central processing unit can be fully utilized and the efficiency of generating the first derived data corresponding to the material can be improved.

[0214] In related technologies, the priority corresponding to shading nodes is relatively low, and materials will not be allocated to shading nodes in priority during resource processing. However, in the resource processing method provided in the embodiment of the present application, in order to achieve the reuse of derived data, for materials that do not depend on other resources, the priority of the shading node can be set to the highest, so that the material can be processed first.

[0215] In some embodiments, the engine can be configured to set the priority of the shading node in response to a set operation on the shading node priority. For example, see Figure 15 , Figure 15 1 is a schematic diagram of a baking task mode interface provided in an embodiment of the present application. In response to a setting operation for the shading node priority 1506 , the priority of the shading node can be set to 1.

[0216] In some embodiments, see Figure 16 , Figure 16 16. This is a flow chart of the engine configuration provided by the embodiment of the present application. In order to set the priority of the shading node, steps 1601 to 1603 may be performed during the engine configuration phase.

[0217] In step 1601, a control parameter is added. The control parameter can be FCommandLine. In step 1602, the control parameter is overwritten with the original engine configuration. The original configuration is the configuration in Gconfig. In step 1603, a parallel task configuration is constructed. This parallel task configuration is configured for the resource processing method provided in the embodiments of this application.

[0218] During the parallel execution of resource processing tasks, steps 1604 to 1605 may be executed. In step 1604, priority setting parameters may be obtained from control parameters. In step 1605, priority setting parameters may be set. Through steps 1601 to 1605, the engine can be configured and the priorities of shading nodes can be set.

[0219] In related technologies, when materials are loaded, shader compilation will be automatically performed, which will cause repeated compilation of materials in different resource processing tasks. In order to avoid such problems, for each resource processing task, materials that are not in the resource processing task can be eliminated. That is, for each resource processing task, only the materials corresponding to the resource processing task are compiled, which can avoid repeated compilation and improve the efficiency of material processing compared to the repeated compilation solution.

[0220] Continue to see Figure 12 In step 1043B, the target resource to be processed is obtained based on the first derived data and the current resource to be processed.

[0221] In some embodiments, when the current resource to be processed does not depend on other resources to be processed, the first derived data can be merged into the current resource to be processed, thereby obtaining the target resource to be processed. In this way, the target resource to be processed can be accurately obtained.

[0222] In some embodiments, the data structure corresponding to the current resource to be processed includes bulk data (BulkData), and the first derived data can be merged into the bulk data of the current resource to be processed, thereby obtaining the target resource to be processed.

[0223] In some embodiments, when the current resource to be processed depends on other resources to be processed, a target resource to be processed can be generated based on the first derived data, the second derived data, the current resource to be processed, and the dependent resources. In some embodiments, the first derived data can be merged with the current resource to be processed to obtain the first resource to be processed, and the second derived data can be merged with the dependent resources to obtain the second resource to be processed, with the second resource to be processed and the second resource to be processed being used as the target resource to be processed.

[0224] In some embodiments, if the data structure corresponding to the current resource to be processed includes batch data, the first derived data can be merged into the batch data of the current resource to be processed, thereby obtaining the first resource to be processed. If the data structure corresponding to the dependent resource includes batch data, the second derived data can be merged into the batch data of the dependent resource, thereby obtaining the second resource to be processed. The second resource to be processed and the second resource to be processed are used as the target resource to be processed. In this way, the target resource to be processed can be accurately obtained.

[0225] In step 1044B, the target resource to be processed is serialized to obtain resource data in the target format.

[0226] In some embodiments, during the serialization process, the package summary (PackageFileSummary), resource names (Names), collectable text data (Gatherable TextData), import tables, export tables, software package references (SoftPackageReferences), and batch data can be serialized together to obtain resource data in the target format. In this way, resource data in the target format can be obtained while improving the efficiency of processing the resources to be processed, thereby achieving batch serialization.

[0227] In some embodiments, the resource processing method provided by the embodiments of the present application can be executed by multiple devices together. In the case where multiple devices execute resource processing tasks in parallel, the execution subject of the embodiment of the present application can be the first device. Figure 17, Figure 17 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 7 ,exist Figure 3 Before step 104 shown, steps 105 and 106 may also be performed, which are described in detail below.

[0228] In step 105, performance information of multiple devices is obtained.

[0229] Multiple devices may include a first device and at least one second device. The first device and the second device may be terminals, servers, or a combination of the two. Below, taking the first device as the first terminal and the second device as the second terminal as an example, the method of executing resource processing tasks in parallel by multiple devices is introduced.

[0230] In some embodiments, performance information of multiple devices can be obtained, where the performance information may include the number of CPU cores, memory usage, device name, device communication address, and single-core performance indicators. The single-core performance indicator can be obtained using a CPU performance formula. A performance score for a preset number of times can be obtained using the performance formula. The lowest performance score can be used as the single-core performance indicator, and a performance score below a performance score threshold can also be used as the single-core performance indicator. The preset number of times can be set based on actual usage requirements, for example, 10,000 times.

[0231] In some embodiments, when the resource processing task is a resource baking task, the performance information of the device can be configured in response to an input operation on the device performance information, see Figure 15 In response to an input operation on the device name 1501, the device name can be set. In response to an input operation on the device communication address 1502, the device communication address can be set. In response to an input operation on the number of cores 1503, the number of cores of the device can be set. In response to an input operation on the number of memories 1504, the currently available memory amount of the device can be set. In response to an input operation on the performance benchmark 1505, a performance benchmark indicator can be set. In this way, accurate device performance information can be set, thereby enabling more efficient use of device resources to execute processing tasks.

[0232] In some embodiments, in response to a trigger operation on a device included in the device list display interface, performance information of multiple devices may be obtained. For example, see Figure 18 , Figure 18This is a schematic diagram of a device list display interface provided by an embodiment of the present application. In response to a trigger operation for a device in the device list display interface, "first device 1801, second device 1802, second device 1804" may be displayed in a check box, and the first device 1801, the second device 1802, and the second device 1804 are marked with a "√" as being selected. The second device 1803 and the second device 1805 are not selected.

[0233] In some embodiments, the device list display interface is provided with a search control, and in response to an input operation on the search control, performance information of multiple devices can be obtained. For example, see Figure 18 In response to an input operation on the search control 1806, the performance information of multiple devices can be obtained. In this way, the performance information of multiple devices can be obtained according to the actual usage needs of the user.

[0234] In step 106, resource processing tasks are allocated to each device based on the performance information of the multiple devices.

[0235] In some embodiments, for each of the multiple devices, the product of a single-core performance indicator and the number of cores is used as the device performance indicator. Resource processing tasks are allocated to each device based on the device performance indicator. In some embodiments, the sum of the device performance indicators of each device can be obtained, and a quotient of the sum and a target number can be determined. For each device, the number of resource processing tasks corresponding to the device can be determined based on the device performance indicator of the device and the quotient. The device performance indicator of the device is multiplied by the inverse of the quotient to obtain the number of resource processing tasks corresponding to the device.

[0236] In some embodiments, the product of a single-core performance indicator and the number of cores is used as a device performance indicator. After obtaining the device performance indicator, any one device performance indicator can be selected as a target performance indicator. The device performance indicator of each device is divided by the target performance indicator to obtain a performance benchmark indicator. The quotient of the sum of the performance benchmark indicators and the target number is obtained. The device performance benchmark indicator of the device is multiplied by the inverse of the quotient to obtain the number of resource processing tasks corresponding to the device. The number of resource processing tasks corresponding to the device is a positive integer.

[0237] If the number of resource tasks assigned to a device is less than the target number, the remaining tasks can be assigned to the device with the highest performance index, or to any device whose performance index exceeds a preset index threshold. For example, the devices include first device 1, second device 1, and second device 2. The single-core performance index of first device 1 is 493, the single-core performance index of second device 1 is 491, and the single-core performance index of second device 2 is 654. The number of cores of first device 1 is 64, the number of cores of second device 1 is 64, and the number of cores of second device 2 is 16. See Table 1, which shows device information 1.

[0238] Table 1 Equipment Information 1

[0239] name First device 1 Second device 1 Second device 2 Single-core performance indicators 493 491 654 Number of cores 64 64 16

[0240] The product of the single-core performance index and the number of cores is used as the device performance index. The device performance index of the first device 1 is 31552, the device performance index of the second device 1 is 31424, and the device performance index of the second device 2 is 10464. The device performance index of the second device 1 is used as the target performance index. The performance baseline index of the first device 1 is approximately 1, the performance baseline index of the second device 1 is 1, and the baseline performance index of the second device 2 is 0.3. The sum of the baseline performance indexes is 2.3. The target number is 10, and the quotient of the sum of the performance baseline indexes and the target number is 0.23. See Table 2, which contains device information 2.

[0241] Table 2 Equipment Information 2

[0242] name First device 1 Second device 1 Second device 2 Equipment performance indicators 31552 31424 10464 Performance benchmark indicators 1 1 0.3

[0243] Multiply the device performance benchmark index of the device by the inverse of the quotient. The number of resource processing tasks of the first device 1 is 4, the number of resource processing tasks of the second device 1 is 4, and the number of resource processing tasks of the second device 2 is 1. The remaining resource processing task can be allocated to the first device 1. See Table 3, which is the task allocation information.

[0244] Table 3 Task allocation information

[0245] name First device 1 Second device 1 Second device 2 total Number of resources to be processed 27160 21728 5432 54320 Resource processing tasks 5 4 1 10

[0246] Among them, the number of resources to be processed processed by the first device 1 is 27160, the number of resources to be processed processed by the second device 1 is 21728, the number of resources to be processed processed by the second device 2 is 5432, and the total number of resources to be processed is 54320.

[0247] The method of allocating resource processing tasks based on device performance indicators provided in the embodiment of the present application can allocate more resource processing tasks to devices with better performance and allocate fewer resource processing tasks to devices with poorer performance, thereby achieving accurate allocation of resource processing tasks.

[0248] In some embodiments, the difference in execution time between any two resource processing tasks is less than a difference threshold. After allocating tasks according to the method of allocating resource processing tasks based on device performance indicators provided in an embodiment of the present application, the difference in execution time of each device executing the resource processing tasks in parallel is less than a preset device execution time difference.

[0249] See also Figure 19 , Figure 19 This is an example of the execution time of the resource processing task provided in the embodiment of the present application. Figure 2 The number of resource processing tasks of the first device 1 is 5, the number of resource processing tasks of the second device 1 is 4, and the number of resource processing tasks of the second device 2 is 1. The duration for the first device 1 to execute resource processing tasks in parallel is consistent with the duration for the second device 1 to execute resource processing tasks in parallel and the duration for the second device 2 to execute resource processing tasks.

[0250] In some embodiments, different operating systems can be used to execute the resource processing method provided in the embodiments of the present application, see Figure 20 , Figure 20 This is an example of the execution time of the resource processing task provided in the embodiment of the present application. Figure 3 ,exist Figure 20 In the embodiment, the first operating system is used to execute the resource processing method provided by the embodiment of the present application, and the execution time of the first device 1, the second device 1 and the second device 2 are all much shorter than the time of the resource processing method in the related art.

[0251] When the second operating system is used to execute the resource processing method provided in the embodiment of the present application, the execution time of the first device 1, the second device 1, and the second device 2 is significantly shorter than that of the resource processing method in the related art. This shows that by having multiple devices execute resource processing tasks in parallel, the execution time can be greatly reduced, the efficiency of executing resource processing tasks can be improved, and the efficiency of processing pending resources can be improved.

[0252] The following combination Figure 21-23 The resource processing method provided in this application embodiment is introduced by way of example, see Figure 21 , Figure 21 Schematic diagram of the resource processing method provided in this embodiment of the application Figure 8 , detailed description is given below.

[0253] In step 2101, a first resource to be processed is determined based on a resource registry and a resource path, a second information to be processed is determined based on resource creation information and the resource registry, and the first information to be processed and the second information to be processed are used as resources to be processed.

[0254] Through step 2101, the resources to be processed that are not included in the resource registration table can be obtained. This application can obtain the resources to be processed with and without dependencies corresponding to the application project, which provides a prerequisite for the implementation of this application to perform resource splitting and parallel execution of tasks.

[0255] In step 2102 , based on the resource type of each resource to be processed, multiple resources to be processed are divided into at least one resource group to be processed, and a target number of resource processing tasks are created based on the at least one resource group to be processed.

[0256] In step 2102, for each pending resource group, the multiple pending resources included in the pending resource group are divided into a target number of pending resource subgroups, where the number of pending resources in each pending resource subgroup is a positive integer. The following operation is repeated until all pending resource subgroups are empty: one pending resource subgroup is extracted from each pending resource group, and the extracted pending resource subgroups are merged into target resource groups. Resource processing tasks are created for each target resource group, resulting in the target number of resource processing tasks. Step 2102 enables precise division of pending resources.

[0257] In step 2103, for each resource processing task, a thread corresponding to the resource processing task is created, and the created thread is called to execute multiple resource processing tasks in parallel.

[0258] When the resource processing task is a resource baking task, batch loading of resources, batch acquisition of derived data, and batch serialization can be implemented, greatly improving the efficiency of processing pending resources. In some embodiments, Unreal Engine's visualization tool (Unreal Insights) can be used to analyze the execution process of the resource baking task, and an analysis results interface can be displayed. The analysis results interface can display the areas corresponding to batch loading of resources, batch acquisition of derived data, and batch serialization.

[0259] When processing resources to be processed, they are processed in order of the number of dependencies from small to large, and derived data of resources without dependencies can be generated and stored. Subsequently, when processing derived data of resources with dependencies, there is no need to repeatedly generate derived data of the dependent resources, thereby realizing the reuse of derived data.

[0260] See also Figure 22 , Figure 22This is a schematic diagram of executing a resource baking task provided by an embodiment of the present application. For the resource processing task 2201, the texture map can be processed first. Figure 8 , load the texture Figure 8 and find the texture map in the data cache center 2204 Figure 8 The corresponding first derived data, in the presence of texture Figure 8 In the case of the corresponding first derived data, the texture map is obtained from the data cache center 2204 Figure 8 The corresponding first derived data. In the absence of texture mapping Figure 8 Generate texture maps corresponding to the first derived data Figure 8 The first derived data of the texture is stored in the data cache center 2204. Figure 8 The first derived data is merged into the texture map Figure 8 The batch data is obtained to obtain the target resources to be processed, and then serialized.

[0261] Assume that the physical model 1 depends on the texture map Figure 8 , you can load physical model 1 and texture map Figure 8 and find the texture map in the data cache center 2204 Figure 8 The corresponding second derived data and the first derived data corresponding to the physical model 1 from the data cache center 2204. If the first derived data corresponding to the physical model 1 does not exist, the first derived data of the physical model 1 is generated and stored in the data cache center 2204. Figure 8 The second derivative data is merged into the texture map Figure 8 The first derived data of the physical model 1 is merged into the batch data of the physical model 1 to obtain the target resource to be processed, thereby performing serialization.

[0262] The execution process for other resources in resource processing task 2201 is consistent with the above content. Resource processing task 2202 and resource processing task 2203 are executed in parallel with resource processing task 2201. The execution process is consistent with the execution process of resource processing task 2201. The difference lies in the resources, which will not be repeated here.

[0263] See also Figure 23 , Figure 23 This is a schematic diagram of the resource processing method provided in the embodiment of the present application. Figure 9 , combined with Figure 23 The resource processing method provided in the embodiment of the present application is described as follows: multiple resources to be processed of the application project corresponding to the engine in the target application can be determined, and after splitting the resources to be processed, a resource processing task can be created for each target resource combination. Figure 23In the middle are resource processing task 2301, resource processing task 2302, resource processing task 2303, resource processing task 2304, resource processing task 2305 and resource processing task 2306.

[0264] Based on the performance information of the first and second devices, resource processing tasks are allocated to the first and second devices. The resource processing tasks allocated to the first device are resource processing task 2301, resource processing task 2302, and resource processing task 2303. The resource processing tasks allocated to the second device are resource processing task 2304, resource processing task 2305, and resource processing task 2306.

[0265] For each resource processing task, multiple threads can be created and called to execute multiple resource processing tasks in parallel. Figure 23 In FIG, only three threads of resource processing task 2301 are shown, namely thread 2307, thread 2308 and thread 2309. In this way, the efficiency of processing resources can be improved.

[0266] The following continues to describe the exemplary structure of the resource processing device 455 provided in the embodiment of the present application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the resource processing device 455 of the memory 440 may include:

[0267] The determination module 4551 is used to determine a plurality of to-be-processed resources of the application project corresponding to the engine in the target application.

[0268] The division module 4552 is configured to divide the plurality of resources to be processed into at least one resource group to be processed based on the resource type of each resource to be processed.

[0269] The creation module 4553 is configured to create a target number of resource processing tasks based on the at least one to-be-processed resource group, wherein the resource processing tasks are configured to process the to-be-processed resources in the corresponding to-be-processed resource group.

[0270] The execution module 4554 is configured to execute a plurality of the resource processing tasks in parallel; wherein the difference between the execution durations of any two of the resource processing tasks is less than a difference threshold.

[0271] In some embodiments, the resource group to be processed includes multiple resources to be processed. The creation module 4551 is further configured to, for each resource group to be processed, divide the multiple resources to be processed included in the resource group to be processed into the target number of resource subgroups to be processed, where the number of resources to be processed in the resource subgroups to be processed is a positive integer; repeatedly perform the following operations until each resource subgroup to be processed is empty: extract one resource subgroup to be processed from each resource group to be processed, and merge the extracted resource subgroups to be processed into a target resource group; and create resource processing tasks corresponding to each target resource group to obtain the target number of resource processing tasks.

[0272] In some embodiments, the creation module 4551 is also used to perform at least one resource extraction on multiple resources to be processed, and the number of resources to be processed each time the resource extraction is performed is the target number; the resources to be processed each time the resource extraction is performed is evenly distributed to the target number of resource subgroups to be processed; when the number of resources to be processed remaining when performing the resource extraction is less than the target number, the remaining resources to be processed are divided into different resource subgroups to be processed without duplication.

[0273] In some embodiments, the execution module 4554 is further configured to create a thread corresponding to each resource processing task; and call the created multiple threads to execute the multiple resource processing tasks in parallel.

[0274] In some embodiments, the execution module 4554 is also used to call each of the threads to perform the following processing respectively to execute the corresponding resource processing task: determine at least one resource to be processed corresponding to the resource processing task; for each resource to be processed, obtain the number of dependencies of the resource to be processed on other resources to be processed in the application project; and process the at least one resource to be processed in order of the number of dependencies from small to large.

[0275] In some embodiments, the resource processing task is a resource baking task, and the execution module 4554 is also used to execute multiple resource baking tasks in parallel, and perform the following processing for each resource baking task: when the number of resources to be processed corresponding to the resource baking task is multiple, load multiple resources to be processed as current resources to be processed; obtain the first derived data corresponding to the current resources to be processed; based on the first derived data and the current resources to be processed, obtain the target resources to be processed; serialize the target resources to be processed to obtain resource data in the target format.

[0276] In some embodiments, the execution module 4554 is also used to search for the first derived data corresponding to the current resource to be processed in the data cache center, and if the first derived data corresponding to the current resource to be processed exists, obtain the first derived data corresponding to the current resource to be processed from the data cache center; if the first derived data corresponding to the current resource to be processed does not exist, generate the first derived data of the current resource to be processed.

[0277] In some embodiments, the resource to be processed is a material, and the software modules stored in the resource processing device 455 of the memory 440 may further include:

[0278] An acquisition module is used to obtain the number of tasks of the resource processing task currently being executed and the number of cores before generating the first derived data of the current resource to be processed; based on the number of tasks and the number of cores, determine the number of shading nodes and create the said number of shading nodes.

[0279] The execution module 4554 is further configured to generate first derived data of the currently processed resource through the number of shading nodes.

[0280] In some embodiments, the current resource to be processed depends on other resources to be processed, and the execution module 4554 is also used to load the other resources to be processed that the current resource to be processed depends on to obtain dependent resources before obtaining the target resource to be processed based on the first derived data and the current resource to be processed; and obtain the second derived data corresponding to the dependent resource.

[0281] The execution module 4554 is further configured to generate a target resource to be processed based on the first derived data, the second derived data, the current resource to be processed, and the dependent resource.

[0282] In some embodiments, the execution module 4554 is also used to merge the first derived data into the current resource to be processed to obtain a first resource to be processed; merge the second derived data into the dependent resource to obtain a second resource to be processed; and use the second resource to be processed and the second resource to be processed as target resources to be processed.

[0283] In some embodiments, the method is applied to a first device, and the acquisition module is further used to obtain performance information of multiple devices before executing multiple resource processing tasks in parallel, and the multiple devices include the first device and at least one second device; based on the performance information of the multiple devices, the resource processing tasks are allocated to each of the devices.

[0284] The execution module 4554 is further configured to control the multiple devices to execute the multiple resource processing tasks in parallel.

[0285] In some embodiments, the performance information includes a single-core performance indicator and the number of cores; the acquisition module is also used to use the product of the single-core performance indicator and the number of cores as the device performance indicator for each device among the multiple devices; and based on the device performance indicator, allocate the resource processing task to each device.

[0286] In some embodiments, the acquisition module is also used to obtain the sum of the device performance indicators of each of the devices; determine the quotient of the sum and the target number; and for each of the devices, determine the number of resource processing tasks corresponding to the device based on the device performance indicator of the device and the quotient.

[0287] In some embodiments, the determination module 4551 is also used to obtain the resource path of the engine for creating the object in the target application, the resource registry for recording resource dependencies, and resource creation information, wherein the resource creation information includes resource information in the process of creating the object in the target application; based on the resource path and the resource registry, determine the first resource to be processed, which is a resource with dependencies required to create the object; based on the resource creation information and the resource registry, determine the second resource to be processed, which is not included in the resource registry; determine the first resource to be processed and the second resource to be processed as resources to be processed.

[0288] An embodiment of the present application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the resource processing method described above in the embodiment of the present application.

[0289] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the resource processing method provided in the embodiment of the present application, for example, Figure 3 The resource processing method shown.

[0290] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0291] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0292] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0293] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0294] In summary, through the embodiment of the present application, it is possible to obtain the resources to be processed that are not included in the resource registry, and the present application can obtain the resources to be processed with and without dependencies corresponding to the application project, which provides a prerequisite for the embodiment of the present application to perform resource splitting and parallel execution tasks. The embodiment of the present application can achieve accurate division of the resources to be processed, and the embodiment of the present application can achieve batch loading of resources, batch acquisition of derived data and batch serialization, which greatly improves the efficiency of processing the resources to be processed. When processing the resources to be processed, the embodiment of the present application processes the resources to be processed in order of the number of dependencies from small to large, and can generate and store derived data of resources without dependencies. Subsequently, when processing the derived data of resources with dependencies, there is no need to repeatedly generate the derived data of the dependent resources, thereby realizing the reuse of derived data. The difference in the time length of the processing of the resources to be processed in different resource combinations in the embodiment of the present application is less than the pre-set difference threshold, that is, the execution time length of executing different resource processing tasks is less than the difference threshold, that is, the difference in the execution time length of any two resource processing tasks is less than the difference threshold, which can make more full use of the central processing unit and avoid the bucket effect.

[0295] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. A resource processing method, characterized in that: The method comprises: Determine multiple resources to be processed in the application project corresponding to the engine in the target application; Dividing the plurality of resources to be processed into at least one resource group to be processed based on a resource type of each of the resources to be processed; Creating a target number of resource processing tasks based on the at least one to-be-processed resource group, wherein the resource processing tasks are used to process the to-be-processed resources in the corresponding to-be-processed resource group; Execute multiple resource processing tasks in parallel; wherein the difference between the execution time of any two resource processing tasks is less than a difference threshold.

2. The method according to claim 1, characterized in that The resource group to be processed includes multiple resources to be processed; The creating a target number of resource processing tasks based on the at least one to-be-processed resource group includes: For each of the to-be-processed resource groups, dividing the plurality of to-be-processed resources included in the to-be-processed resource group into the target number of to-be-processed resource subgroups, where the number of to-be-processed resources in the to-be-processed resource subgroups is a positive integer; Repeat the following operations until each of the to-be-processed resource subgroups is empty: extract one to-be-processed resource subgroup from each of the to-be-processed resource groups, and merge the extracted to-be-processed resource subgroups into a target resource group; Resource processing tasks corresponding to each target resource combination are created respectively to obtain a target number of resource processing tasks.

3. The method according to claim 2, characterized in that The step of dividing the plurality of resources to be processed included in the group of resources to be processed into the target number of subgroups of resources to be processed includes: Performing resource extraction on the plurality of resources to be processed at least once, wherein the number of resources to be processed in each resource extraction is a target number; Evenly distribute the to-be-processed resources extracted each time to the target number of to-be-processed resource subgroups; When the number of the remaining resources to be processed is less than the target number when the resource extraction is performed, the remaining resources to be processed are divided into different subgroups of resources to be processed without duplication.

4. The method according to claim 1, wherein The parallel execution of the plurality of resource processing tasks includes: For each resource processing task, creating a thread corresponding to the resource processing task; The multiple threads created are called to execute the multiple resource processing tasks in parallel.

5. The method according to claim 4, characterized in that The multiple threads created by the call execute the multiple resource processing tasks in parallel, including: Each of the threads is called to perform the following processing respectively to execute the corresponding resource processing task: Determining at least one to-be-processed resource corresponding to the resource processing task; For each of the resources to be processed, obtaining the number of dependencies of the resource to be processed on other resources to be processed in the application project; The at least one to-be-processed resource is processed in ascending order of the dependency quantity.

6. The method according to claim 1, characterized in that The resource processing task is a resource baking task, and the parallel execution of multiple resource processing tasks includes: Execute multiple resource baking tasks in parallel, and perform the following processing for each resource baking task: When the number of to-be-processed resources corresponding to the resource baking task is multiple, load the multiple to-be-processed resources as the current to-be-processed resources; Obtaining first derived data corresponding to the current resource to be processed; Acquire target resources to be processed based on the first derived data and the current resources to be processed; The target resource to be processed is serialized to obtain resource data in a target format.

7. The method according to claim 6, characterized in that The obtaining of first derived data corresponding to the current resource to be processed includes: Searching for the first derived data corresponding to the current resource to be processed in a data cache center, and if the first derived data corresponding to the current resource to be processed exists, obtaining the first derived data corresponding to the current resource to be processed from the data cache center; If there is no first derived data corresponding to the current resource to be processed, the first derived data of the current resource to be processed is generated.

8. The method according to claim 7, characterized in that The current resource to be processed is a material. Before generating the first derived data of the current resource to be processed, the method further includes: Obtain the number of tasks of the resource processing task currently being executed and the number of cores; Determining the number of shading nodes based on the number of tasks and the number of cores, and creating the number of shading nodes; The generating of the first derived data of the current resource to be processed includes: Generate first derived data of the current resource to be processed by using the number of shading nodes.

9. The method according to claim 6, characterized in that The current resource to be processed depends on other resources to be processed; before acquiring the target resource to be processed based on the first derived data and the current resource to be processed, the method further includes: Loading the other resources to be processed that the current resource to be processed depends on to obtain dependent resources; Obtaining second derived data corresponding to the dependent resource; The step of obtaining target resources to be processed based on the first derived data and the current resources to be processed includes: A target resource to be processed is generated based on the first derived data, the second derived data, the current resource to be processed, and the dependent resource.

10. The method according to claim 9, characterized in that The generating a target resource to be processed based on the first derived data, the second derived data, the current resource to be processed, and the dependent resource includes: Merging the first derived data into the current resource to be processed to obtain a first resource to be processed; Merging the second derived data into the dependent resource to obtain a second resource to be processed; The second to-be-processed resource and the second to-be-processed resource are used as target to-be-processed resources.

11. The method according to claim 1, characterized in that The method is applied to a first device, and before executing the plurality of resource processing tasks in parallel, the method further includes: Acquire performance information of a plurality of devices, the plurality of devices including the first device and at least one second device; Allocating the resource processing task to each of the devices based on the performance information of the multiple devices; The parallel execution of the plurality of resource processing tasks includes: The multiple devices are controlled to execute the multiple resource processing tasks in parallel.

12. The method according to claim 11, characterized in that The performance information includes a single-core performance index and the number of cores; and allocating the resource processing task to each of the devices based on the performance information of the multiple devices includes: For each device among the plurality of devices, taking a product of the single-core performance index and the number of cores as a device performance index; Based on the device performance indicators, the resource processing tasks are allocated to each of the devices.

13. The method according to claim 12, characterized in that Allocating the resource processing task to each of the devices based on the device performance indicator includes: Obtaining a sum of device performance indicators of each of the devices; determining a quotient of the sum and the target number; For each of the devices, the number of resource processing tasks corresponding to the device is determined based on the device performance indicator of the device and the quotient value.

14. The method according to claim 1, wherein The step of determining a plurality of to-be-processed resources of an application project corresponding to an engine in a target application includes: Obtaining a resource path for the engine to create an object in the target application, a resource registry for recording resource dependencies, and resource creation information, wherein the resource creation information includes resource information in the process of creating the object in the target application; Determining a first resource to be processed based on the resource path and the resource registry, where the first resource to be processed is a resource with dependencies required to create the object; Determining a second resource to be processed based on the resource creation information and the resource registry, where the second resource to be processed is not included in the resource registry; The first to-be-processed resource and the second to-be-processed resource are determined as to-be-processed resources.

15. A resource processing device, characterized in that: The device comprises: A determination module, used to determine a plurality of to-be-processed resources of an application project corresponding to an engine in a target application; a partitioning module, configured to partition the plurality of resources to be processed into at least one resource group to be processed based on a resource type of each resource to be processed; A creation module, configured to create a target number of resource processing tasks based on the at least one to-be-processed resource group, wherein the resource processing tasks are configured to process the to-be-processed resources in the corresponding to-be-processed resource group; An execution module is used to execute multiple resource processing tasks in parallel; wherein the difference between the execution time of any two resource processing tasks is less than a difference threshold.

16. An electronic device, characterized in that: The electronic device comprises: a memory for storing computer-executable instructions; The processor is configured to implement the resource processing method according to any one of claims 1 to 14 when executing the computer-executable instructions stored in the memory.

17. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the resource processing method according to any one of claims 1 to 14 is implemented.

18. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the resource processing method according to any one of claims 1 to 14 is implemented.