Compiling method and device, electronic equipment and storage medium

By extracting the feature value set of resource paths and building a filter directory, the problem of cold compilation time in Android-side projects is solved, avoiding compilation stuck and improving compilation efficiency.

CN118885174APending Publication Date: 2024-11-01GUANGZHOU HUYA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410898586.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

During the cold compilation process of Android-side projects, the threads of Java resources and local libraries consume a lot of time, especially on Windows systems, which may cause compilation to be stuck and affect efficiency.

Method used

By obtaining the resource path of the resource merging thread, extracting the feature value set and building a filtered directory, filtering files that meet the directory, thereby reducing input and output retrieval operations during the file merging process and improving compilation efficiency.

Benefits of technology

It effectively reduces the compilation time, avoids stuck situations caused by too many compiled files, and improves compilation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885174A_ABST
    Figure CN118885174A_ABST
Patent Text Reader

Abstract

The invention provides a compiling method and device, electronic equipment and a storage medium, and the method comprises the steps: analyzing a thread-level resource merging processing process, obtaining a resource path scanned by a resource merging thread in the processing process, and extracting a feature value set needing to be filtered according to the resource path, a filtering catalog is constructed through the feature value set, and files conforming to the filtering catalog can be filtered according to the filtering catalog in the compiling process. Compared with the prior art, the information of the resource path can be obtained according to the path characteristic value in the compiling process, and the corresponding file in the resource path can be directly filtered when the path characteristic value conforms to the path characteristic value of the filtering directory; the input and output retrieval operation in the file merging process in the compiling process is effectively reduced, the compiling efficiency is improved, and jamming caused by too many compiled files is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and more specifically, to a compilation method, device, electronic device and storage medium. Background Art

[0002] In Android projects, when compiling code normally, especially cold compilation, executing some Java resources and native library threads will take a lot of time. At the same time, when some native library threads are executed in the Windows system, the compilation will be stuck due to too many scanned files. Summary of the invention

[0003] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide a compilation method, device, electronic device and storage medium, which can effectively reduce the compilation time and improve the compilation efficiency.

[0004] According to a first aspect of the present application, a compilation method is provided, the compilation method comprising:

[0005] Get the resource merging thread during the compilation process;

[0006] Obtain the resource path scanned by the resource merging thread;

[0007] Extracting a feature value set according to the resource path; the feature value set includes a number of path feature values;

[0008] Constructing a filtering catalog based on the feature value set;

[0009] During the compilation process, files that match the filtering directory are filtered.

[0010] In an optional implementation, the path characteristic value includes a first characteristic value and a second characteristic value;

[0011] The first characteristic value is obtained according to a preset keyword of the resource path, and the second characteristic value is determined according to a file of the resource path.

[0012] In an optional implementation manner, the acquiring of the first characteristic value includes:

[0013] Classify the directory feature types and obtain identification keywords corresponding to the directory feature types;

[0014] Acquire the directory feature type of the resource path according to the identification keyword;

[0015] The first feature value is obtained according to the directory feature type of the resource path and the identification keyword.

[0016] In an optional implementation manner, obtaining the second characteristic value includes:

[0017] Preset a determination strategy for the second characteristic value, wherein the determination strategy is set based on the number of files, file names, and file types included in the resource path;

[0018] The second characteristic value is determined according to the determination strategy and the number of files, file names, and file types included in the resource path.

[0019] In an optional implementation, the determination strategy includes:

[0020] When the resource path contains only one file, if the name of the file in the resource path contains the first characteristic value, the file type of the file is used as the second characteristic value; if the name of the file in the resource path does not contain the first characteristic value, the file name and file type of the file are used as the second characteristic value;

[0021] When the resource path contains multiple files, the file types of the multiple files are respectively used as the second feature values.

[0022] In an optional implementation manner, constructing a filtering catalog according to the feature value set specifically includes:

[0023] The path characteristic values ​​corresponding to the resource paths that have not been scanned during the compilation process are obtained, and the filtering directory is constructed according to all the path characteristic values ​​that have not been scanned.

[0024] In an optional implementation manner, obtaining a resource merging thread in a compilation process specifically includes:

[0025] During the compilation process, a resource merging thread related to resource merging and a library merging thread related to local library merging are obtained.

[0026] According to a second aspect of the present application, a compiling device is provided, the compiling device comprising:

[0027] The thread acquisition module is used to obtain the resource merging thread during the compilation process;

[0028] A path acquisition module, used to acquire the resource path scanned by the resource merging thread;

[0029] A feature value acquisition module, used to extract a feature value set according to the resource path; the feature value set includes a number of path feature values;

[0030] A filtering catalogue building module, used to build a filtering catalogue according to the feature value set;

[0031] The compiling module is used to filter the files that meet the filtering directory during the compiling process according to the filtering directory.

[0032] According to a third aspect of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to perform a compilation method described in the first aspect.

[0033] According to a fourth aspect of the present application, a computer storage medium is provided, wherein the computer storage medium stores a computer program, and when the computer program is executed, the compilation method described in the first aspect is implemented.

[0034] According to any of the above aspects, a compilation method, device, electronic device and storage medium provided by the present embodiment analyze the resource merging process at the thread level to obtain the resource path scanned by the resource merging thread during the processing process, and extract the feature value set that needs to be filtered according to the resource path, and construct a filtering directory through the feature value set. In the compilation process, the files that meet the filtering directory can be filtered according to the filtering directory. The resource path obtained by the resource merging thread is more comprehensive, and the path feature value is obtained by analyzing the resource path. Through the path feature value, several resource paths that meet the path feature value can be obtained, which is equivalent to compressing the number of resource paths, and can effectively improve the efficiency of matching the resource path according to the path feature value; and the obtained path feature value contains the information of the resource path, and the information of the resource path can be obtained according to the path feature value during the compilation process. When the path feature value is met, the corresponding file in the resource path can be directly filtered, which effectively reduces the input and output retrieval operations in the file merging process during the compilation process, improves the compilation efficiency, and avoids jamming caused by too many compiled files. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of an application scenario of the control method provided in this embodiment.

[0036] Figure 2 A flowchart of the steps of the compilation method provided in this embodiment.

[0037] Figure 3 A flow chart of the steps for obtaining the first characteristic value provided in this embodiment.

[0038] Figure 4 This is a device structure diagram of the compiling device provided in this embodiment.

[0039] Figure 5 This is a device structure diagram of the electronic device provided in this embodiment.

[0040] Figures are labeled: server 100 , terminal 200 , thread acquisition module 11 , path acquisition module 12 , feature value acquisition module 13 , filter directory construction module 14 , compilation module 15 , memory 21 , processor 22 , bus 23 , communication interface 24 . DETAILED DESCRIPTION

[0041] The drawings of the present invention are only for illustrative purposes and should not be construed as limiting the present invention. In order to better illustrate the following embodiments, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product; it is understandable to those skilled in the art that some well-known structures and their descriptions in the drawings may be omitted.

[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0044] When performing regular code compilation in an Android project, especially cold compilation, a lot of time will be spent on executing some Java resource and native library processing threads. This is because when executing these threads, these threads will continuously perform IO (Input Output) retrieval on resource files and library files, and scan the resource files and library files. When the project is large in scale or contains a large number of resource files and library files, the IO retrieval and scanning process takes a lot of time and computer resources (thread occupancy). At the same time, when compiling an Android project on a Windows system, due to the excessive occupancy of computer resources, it is easy for the compilation to get stuck. Once the compilation gets stuck, it needs to be recompiled, which wastes a lot of time and reduces production efficiency.

[0045] This embodiment provides a technical solution that can solve the above-mentioned problem. The specific implementation methods of this application are described in detail below in conjunction with the accompanying drawings.

[0046] For example, a schematic diagram of an application scenario of a compilation method provided in an embodiment of the present application is provided. Figure 1 As shown, the application scenario includes at least a server 100 and a terminal 200 that can communicate with the server 100. The server 100 has an image processing function and can also have a data transmission function for video streams and audio streams; the terminal device 200 has a streaming media playback function and can also have an image processing function.

[0047] It is understandable that the server 100 can be an independent electronic device or a cluster of multiple electronic devices; the terminal 200 can be a smart phone terminal, a personal computer, a tablet computer, a car terminal, etc., but is not limited thereto.

[0048] In an operative manner, the server 100 and the terminal 200 may respectively execute a compilation method provided in an embodiment of the present application, or, optionally, the compilation method provided in an embodiment of the present application is partially executed in the server 100 and partially executed in the terminal 200.

[0049] like Figure 2 As shown, this embodiment provides a compilation method, and the compilation method includes:

[0050] S1: Get the resource merging thread during the compilation process;

[0051] In this embodiment, the resource merging thread in the acquisition compilation process may specifically include:

[0052] During the compilation process, a resource merging thread related to resource merging and a library merging thread related to native library merging are obtained. For example, in a specific implementation of this embodiment, mergeXXXJavaResource threads and mergeXXXNativeLibs threads during the compilation process may be obtained, where XXX represents the buildType being compiled;

[0053] The mergeXXXJavaResource thread is mainly used to scan the product directory of each module, as well as the compressed packages of dependent libraries such as aar or jar, to check whether there are other resource files except .class and .so, and record the corresponding resource path to prepare for subsequent packaging into apk;

[0054] The mergeXXXNativeLibs thread operates similarly to the mergeXXXJavaResource thread. It is used to scan the product directory of each module and the compressed packages of dependent libraries such as aar or jar to check whether there are .so resource files in them, record the corresponding resource paths, and prepare for subsequent packaging into apk.

[0055] S2: Obtain the resource path scanned by the resource merging thread;

[0056] In this embodiment, the relevant classes of the resource merging thread and the library merging thread can be obtained respectively through the gradle help command and the analysis of the agp plug-in source code. Exemplarily, the implementation class of the mergeXXXJavaResource thread is MergeJavaResourceTask, and the implementation class of the mergeXXXNativeLibs thread is MergeNativeLibsTask. By analyzing the implementation classes MergeJavaResourceTask and MergeNativeLibsTask respectively, the tool class MergeJavaResourcesDelegate used by both the mergeXXXNativeLibs thread and the mergeXXXJavaResource thread can be obtained;

[0057] After obtaining the relevant classes of the resource merging thread and the library merging thread, breakpoint testing is performed on the source code of the relevant classes of the resource merging thread and the library merging thread through the debugging mode, the memory data of the relevant classes is observed through the breakpoint testing, and the resource path scanned by the resource merging thread and the library merging thread is obtained according to the memory data of the relevant classes.

[0058] S3: extracting a feature value set according to the resource path;

[0059] In this embodiment, the feature value set includes several path feature values, and the path feature values ​​include a first feature value and a second feature value. The first feature value represents the prefix of the resource path to be filtered, which is obtained according to a preset keyword of the resource path, and the second feature value represents the suffix of the resource path to be filtered, which is determined according to the file inclusion of the resource path.

[0060] Specifically, Figure 3 As shown, obtaining the first characteristic value may include:

[0061] A1: Classify the directory feature types and obtain identification keywords corresponding to the directory feature types;

[0062] A2: Obtaining the directory feature type of the resource path according to the identification keyword;

[0063] A3: Obtain the first feature value according to the directory feature type of the resource path and the identification keyword.

[0064] In a preferred implementation of this embodiment, after analysis, the directory feature type may include a product type and a gradle cache type; the identification keyword may analyze the resource path, and pre-acquire the identification keyword of each directory feature type according to the analysis result;

[0065] The identification keywords of the product type can be set to build / intermediates and .transforms, which are the keywords representing the product paths of the compilation process and the preprocessing process respectively; if the resource path includes the identification keywords of the product type, the directory feature type is the product type, and the first feature value is set to the corresponding module directory field moduleDir.

[0066] Exemplarily, it is assumed that the resource path is:

[0067] appName / app / host / build / intermediates / library_java_res / debug / res.jar

[0068] According to the resource path, since the resource path contains the identification keyword build / intermediates of the product type, it means that the resource path belongs to the product type, and the module directory field of the resource path is app / host, so the first feature value is set to the module directory field app / host. The processing process of the identification keyword .transforms is similar to that of the identification keyword build / intermediates, and can refer to the above operation for the identification keyword build / intermediates.

[0069] The identification keyword of the gradle product type can be set to the gradle version, and whether the file in the resource path is a gradle cache file is determined by identifying whether the resource path contains the gradle version; in the resource path of the gradle product type, there are usually two situations after the gradle version. The first situation is that the gradle version is followed by a 32-bit hash number, and the 32-bit hash number is followed by a path field; the second situation is that the gradle version is followed by a path field, and the path field is followed by a 32-bit hash number. Since the hash number is random, the hash number is not included in the consideration range of the first feature value, and the path field is directly used as the first feature value; when the directory feature type is the gradle product type, and the resource path includes the identification keyword, the first feature value is set to the path field that does not contain a number and is closest to the identification keyword in the resource path.

[0070] Exemplarily, it is assumed that the resource path is:

[0071] .gradle / caches / transforms-2 / files-2.1 / 2b9781b9a6c379dc2ce8c099def5c8bc / jetified-mtpencryp t-adr-1.2.100 / jars / classes.jar

[0072] According to the resource path, since it contains the identification keyword files-2.1 of the gradle product type, files-2.1 represents the version of gradle, so the directory feature type of the resource path is obtained as the gradle product type, and then the path field subsequent to the identification keyword is obtained, and it is found that a string of 32-bit hash numbers follows the identification keyword, which belongs to the first case of the above-mentioned gradle product type, so the 32-bit hash number is skipped, and the path field jetified-mtpencrypt-adr- (excluding numbers) closest to the identification keyword is selected, and the path field jetified-mtpencrypt-adr- is set as the first feature value.

[0073] Assume that the resource path is:

[0074] .gradle / caches / transforms-2 / files-2.1 / androidx.room / room-common / 2.2.5 / f5e3b73a0c2ab5e276e26868e4ce3542baede207 / room-common-2.2.5.jar

[0075] According to the resource path and the identification keyword files-2.1 contained therein, the directory feature type of the resource path is obtained as the gradle product type. The subsequent path field of the resource path is analyzed. The identification keyword is followed by a path field, and the path field is followed by a string of 32-bit hash numbers, which belongs to the second case of the above-mentioned gradle product type. Therefore, the path field androidx.room / room-common, which is closest to the identification keyword, is selected and the path field androidx.room / room-common is set as the first feature value.

[0076] In this embodiment, the second characteristic value can be obtained by presetting a second characteristic value determination strategy, wherein the determination strategy is set based on the number of files, file names, and file types contained in the resource path; the second characteristic value is determined according to the determination strategy and the number of files, file names, and file types contained in the resource path.

[0077] Specifically, the determination strategy may include:

[0078] When the resource path contains only one file, if the name of the file in the resource path contains the first characteristic value, the file type of the file is used as the second characteristic value; if the name of the file in the resource path does not contain the first characteristic value, the file name and file type of the file are used as the second characteristic value;

[0079] When the resource path contains multiple files, the file types of the multiple files are respectively used as the second feature values.

[0080] For example, it is assumed that the resource path of the product type is:

[0081] appName / app / host / build / intermediates / library_java_res / debug / res.jar

[0082] If it only contains one .jar file, namely, the res.jar file, the second feature value can be set to res.jar; and based on the above example description, the path feature value can be expressed as app / host|res.jar; if the file contains multiple .jar files, the second feature value can be set to jar, and the path feature value can be expressed as app / host|jar. If the file also contains other types of files, the second feature value and the path feature value are set accordingly.

[0083] Furthermore, in this embodiment, in the process of obtaining the second characteristic value, if the name of the file in the resource path contains the first characteristic value, the file type of the file is used as the second characteristic value. The resource path is generated by the system. During the generation process of the system, the location of the corresponding file is set as needed, which may cause the generated resource path to be segmented, and then the name of the file in the resource path may contain the first characteristic value. The occurrence of this situation also means that there are no other files under this resource path, so the file type of the file can be directly used as the second characteristic value.

[0084] For example, it is assumed that the resource path of the product type is:

[0085] .gradle / caches / transforms-2 / files-2.1 / ec2bb9147f6401cfac531812392d03be / jetified-ex-2.0.11_fixbug.jar

[0086] According to the resource path and the identification keyword files-2.1 contained therein, the directory feature type of the resource path is obtained as the gradle product type, and the path field jetified-ex- after the 32-bit hash number is selected as the first feature value. Since the path field jetified-ex- is part of the file name of the file in the resource path, the second feature value can be set to .jar, and the corresponding path feature value can be expressed as jetified-ex-|.jar.

[0087] S4: constructing a filtering catalog according to the feature value set;

[0088] In this embodiment, the project can be compiled in advance. During the compilation process, the scanned path is compared with each path feature value in the feature value set, and the path feature values ​​that have not been scanned are marked and recorded, and all the path feature values ​​that have not been scanned are constructed as the filtering directory.

[0089] S5: During the compilation process, the files matching the filtering directory are filtered.

[0090] In this embodiment, during the compilation process, before executing the resource merging thread, the corresponding files are filtered through the filtering directory, which effectively reduces the file paths that need to be searched by the resource merging thread and improves the compilation efficiency.

[0091] It should be noted that in this implementation, the implementation classes of commonly used resource merging threads, such as mergeXXXNativeLibs thread and mergeXXXJavaResource thread, are in the agp (android gradle plugin) plug-in, and the compilation method of this embodiment is also based on the improvement of the agp plug-in. Therefore, in this embodiment, before executing step S1, the corresponding source code of the encoding method of this embodiment needs to be hooked, specifically including:

[0092] Obtain the agp plug-in that the corresponding source code depends on, and before loading the dependent agp plug-in, configure the corresponding source code through a Hook hook.

[0093] Based on the same inventive concept, this embodiment also provides a compiling device, such as Figure 4 As shown, the compiling device comprises:

[0094] The thread acquisition module 11 is used to acquire the resource merging thread in the compilation process;

[0095] In this embodiment, the thread acquisition module 11 can be used to execute Figure 2As shown in step S1, for the specific description of the thread acquisition module 11, reference may be made to the description of step S1.

[0096] A path acquisition module 12, used to acquire the resource path scanned by the resource merging thread;

[0097] In this embodiment, the path acquisition module 12 can be used to execute Figure 2 As shown in step S2, for the specific description of the path acquisition module 12, reference may be made to the description of step S2.

[0098] A feature value acquisition module 13 is used to extract a feature value set according to the resource path; the feature value set includes a number of path feature values;

[0099] In this embodiment, the feature value acquisition module 13 can be used to perform Figure 2 As shown in step S3, for the specific description of the feature value acquisition module 13, reference may be made to the description of step S3.

[0100] A filtering catalogue building module 14, used to build a filtering catalogue according to the feature value set;

[0101] In this embodiment, the filtering directory construction module 14 can be used to execute Figure 2 As shown in step S4, for the detailed description of the filtering catalogue building module 14, reference may be made to the description of step S4.

[0102] The compiling module 15 is used to filter the files that meet the filtering directory during the compiling process according to the filtering directory.

[0103] In this embodiment, the compiling module 15 can be used to execute Figure 2 As shown in step S5, for the detailed description of the compiling module 15, reference may be made to the description of step S5.

[0104] Based on the same inventive concept, this embodiment also provides an electronic device, Figure 5 The structure diagram of the electronic device of this embodiment is shown, which includes a memory 21 and a processor 22. The memory 21 stores computer-readable instructions, and the processor 22 executes the computer-readable instructions to implement the compilation method of this embodiment.

[0105] Preferably, the electronic device further includes a bus 23 and a communication interface 24 , and the processor 22 , the communication interface 24 and the memory 21 are connected via the bus 23 .

[0106] The memory 21 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 24 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 23 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus 23 may be divided into an address bus, a data bus, a control bus, etc. (not fully drawn in the figure).

[0107] The processor 22 may be an integrated circuit chip with signal processing capability. In the specific implementation process, each step in the above method embodiment may be completed by the hardware integrated logic circuit or software instructions in the processor 22. The above processor 22 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, which may implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor 22 may also be any conventional processor 22, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 21, and the processor 22 reads the information in the memory 21 and completes the steps of the method of the above embodiment in combination with its hardware.

[0108] An embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor 22, the computer-executable instructions prompt the processor 22 to implement a compilation method described above. The specific implementation can be found in the embodiment, which will not be repeated here.

[0109] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0110] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A compiling method, characterized in that: The compilation method comprises: Get the resource merging thread during the compilation process; Obtain the resource path scanned by the resource merging thread; Extracting a feature value set according to the resource path; the feature value set includes a number of path feature values; Constructing a filtering catalog based on the feature value set; During the compilation process, files that match the filtering directory are filtered.

2. A compiling method according to claim 1, characterized in that: The path characteristic value includes a first characteristic value and a second characteristic value; The first characteristic value is obtained according to a preset keyword of the resource path, and the second characteristic value is determined according to a file of the resource path.

3. A compiling method according to claim 2, characterized in that: The acquisition of the first characteristic value includes: Classify the directory feature types and obtain identification keywords corresponding to the directory feature types; Acquire the directory feature type of the resource path according to the identification keyword; The first feature value is obtained according to the directory feature type of the resource path and the identification keyword.

4. A compiling method according to claim 3, characterized in that: The acquisition of the second characteristic value comprises: Preset a determination strategy for the second characteristic value, wherein the determination strategy is set based on the number of files, file names, and file types included in the resource path; The second characteristic value is determined according to the determination strategy and the number of files, file names, and file types included in the resource path.

5. A compiling method according to claim 4, characterized in that: The determination strategy includes: When the resource path contains only one file, if the name of the file in the resource path contains the first characteristic value, the file type of the file is used as the second characteristic value; if the name of the file in the resource path does not contain the first characteristic value, the file name and file type of the file are used as the second characteristic value; When the resource path contains multiple files, the file types of the multiple files are respectively used as the second feature values.

6. A compiling method according to any one of claims 1 to 5, characterized in that: The step of constructing a filtering catalog according to the feature value set specifically includes: The path characteristic values ​​corresponding to the resource paths that have not been scanned during the compilation process are obtained, and the filtering directory is constructed according to all the path characteristic values ​​that have not been scanned.

7. A compiling method according to any one of claims 1 to 5, characterized in that: The resource merging threads during the acquisition compilation process specifically include: During the compilation process, a resource merging thread related to resource merging and a library merging thread related to local library merging are obtained.

8. A compiling device, characterized in that: The compiling device comprises: The thread acquisition module is used to obtain the resource merging thread during the compilation process; A path acquisition module, used to acquire the resource path scanned by the resource merging thread; A feature value acquisition module, used to extract a feature value set according to the resource path; the feature value set includes a number of path feature values; A filtering catalogue building module, used to build a filtering catalogue according to the feature value set; The compiling module is used to filter the files that meet the filtering directory during the compiling process according to the filtering directory.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores computer-readable instructions, and the processor executes the computer-readable instructions to perform a compilation method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed, a compiling method according to any one of claims 1 to 7 is implemented.