Installation package icon processing method, processing device and server
By constructing a parser registry center and a dynamic parser registration mechanism, the problem of parsing multi-format installation package icons in the server-side Java environment was solved, achieving high-precision and high-reliability icon parsing and synthesis, and improving parsing efficiency and system scalability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
In a server-side Java environment, existing technologies cannot effectively identify and process icons of various installation packages, leading to errors and inconsistencies in icon drawing, and lacking high-precision and high-reliability parsing methods.
A parser registry center is built, including parsers for different types of icon formats. By receiving the icon path information of the installation package file, the icon format type is identified, and the corresponding target parser is selected for parsing. Formats such as PNG, Adaptive Icon, Vector Drawable, and WEBP are supported. Combined with a dynamic parser registration and degradation processing mechanism, the accuracy and efficiency of parsing are ensured.
It achieves high-precision and high-reliability parsing of multi-format installation package icons in a server-side Java environment, reduces computing resource consumption, improves the accuracy of icon format recognition and system scalability, and ensures the stability of the parsing process and user experience.
Smart Images

Figure CN121807304A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of application development technology, and in particular to a method, processing device and server for processing installation package icons. Background Technology
[0002] In related technologies, identifying installation package icons on the server side often suffers from low accuracy in format recognition and poor fault tolerance, resulting in errors and inconsistencies in icon drawing. Summary of the Invention
[0003] The technical problem to be solved by this invention is to provide a method for parsing multi-format installation package icons that can uniformly identify and process them, thereby achieving high-precision and high-reliability multi-format icon parsing.
[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A method for processing installation package icons, applied on a server side, the method comprising: Receive the installation package file and extract the icon path information of the installation package file; Extract the icon file content based on the icon path information, and identify the icon format type of the icon file content; Based on the icon format type, select the corresponding target parser in the parser registry. The parser registry includes parsers corresponding to different icon formats, including parsers for XML format. The icon file content is parsed by the target parser to obtain the parsing result, and then the display result is synthesized based on the parsing result.
[0005] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: An installation package icon processing device is applied to a server. The server is connected to a parser registry center, which includes parsers corresponding to different types of icon formats, including XML format parsers. The device includes: a path recognition module, a format recognition module, a parser selection module, and a parsing processing module. The path recognition module is used to receive the installation package file and extract the icon path information of the installation package file; The format recognition module is used to extract the icon file content based on the icon path information and identify the icon format type of the icon file content; The parser selection module is used to select the corresponding target parser in the parser registry center according to the icon format type; The parsing processing module is used to parse the content of the icon file through the target parser, obtain the parsing result, and then synthesize the display result based on the parsing result.
[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A server includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the installation package icon processing method described above.
[0007] The beneficial effects of this invention are as follows: This invention receives an installation package file, extracts the icon path information of the installation package file, extracts the icon file content based on the icon path information, identifies the icon format type of the icon file content, and selects a corresponding target parser from a parser registry center based on the icon format type. The parser registry center includes parsers corresponding to different types of icon formats, including an XML format parser. The target parser parses the icon file content to obtain the parsing result, and then synthesizes and displays the result based on the parsing result. Because the parser registry center includes parsers corresponding to different types of icon formats, this application can parse different types of icon formats, thus having a wide range of applications. Furthermore, the parser registry center includes an XML format parser, therefore, it can parse XML format icon formats, avoiding blind attempts and invalid parsing, and reducing computational resource consumption. Further, by using a target parser to parse the icon file content to obtain the parsing result, this application can improve the accuracy of parsing, enabling fast parsing of multi-format installation package icons in a server-side Java environment, achieving high-precision and high-reliability multi-format icon parsing and synthesis. Attached Figure Description
[0008] Figure 1 A flowchart illustrating the steps of an installation package icon processing method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a server structure provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of an installation package icon processing system provided in an embodiment of the present invention; Figure 4 A flowchart illustrating the parser registration and management mechanism of an installation package icon processing method provided in this embodiment of the invention; Figure 5 A flowchart illustrating the format recognition and parser selection process for an installation package icon processing method provided in this embodiment of the invention; Figure 6This is a flowchart illustrating the downgrade process of an installation package icon processing method provided in an embodiment of the present invention. Detailed Implementation
[0009] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0010] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0011] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0012] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0013] Accurately extracting application icons from APKs is a fundamental and frequently required function in third-party app stores, enterprise app distribution platforms, and mobile security detection systems. These icons are used not only for front-end display (such as app detail pages, search lists, and recommendation cards) but also frequently for back-end analysis tasks such as brand recognition, counterfeit app detection, and automated screenshot generation.
[0014] Related technologies typically rely on directly reading static PNG icon resources from the APK (Android application package) or obtaining rendered icon bitmaps on the device using APIs provided by the Android system. However, since the introduction of Vector Drawable in Android 5.0 and the Adaptive Icons mechanism in Android 8.0, the storage and rendering of application icons have undergone fundamental changes. Adaptive Icons use an XML declarative structure, splitting the icon into foreground and background layers, and relying on the Android system to dynamically composite the final icon at runtime based on the mask defined by the device manufacturer.
[0015] While this mechanism improves UI consistency and flexibility, it also introduces significant technical challenges: in server-side Java systems lacking an Android runtime environment, it's impossible to directly call system APIs to dynamically parse and render icons, causing traditional icon extraction methods to fail. Specific root causes include: 1. Lack of Android runtime support: The server is usually based on the standard JVM and does not integrate the Android Framework, so it cannot call relevant key APIs, nor can it achieve automatic synthesis and masking of Adaptive Icons.
[0016] 2. Lack of mature Java third-party libraries: Most existing APK parsing tools rely on the Android SDK or are only applicable to local development environments. There is a lack of open-source libraries that can fully support Adaptive Icon semantic parsing and image synthesis in a pure Java server.
[0017] 3. Complex resource formats and strong coupling: The foreground and background resources referenced by Adaptive Icon may be PNG, Vector Drawable or other complex resource types. Among them, the rendering of Vector Drawable heavily depends on Android-specific classes, and the standard Java environment lacks equivalent implementations.
[0018] 4. Compositing logic depends on device context: The final shape of the Adaptive Icon is customized by the device manufacturer. The server cannot predict the target device type, so a universal mask must be used for compositing to ensure visual consistency.
[0019] Therefore, achieving accurate and high-fidelity extraction of APK icons, especially Adaptive Icons, in a server-side Java environment has become a systematic technical challenge involving knowledge from multiple domains (APK structure, Android resource system, image processing, and XML parsing). Existing technical solutions cannot directly meet this requirement, necessitating the construction of a high-precision and highly reliable parsing engine.
[0020] To address the aforementioned problems, this application provides a method for processing installation package icons. An embodiment of this invention, applied to a server, is described below, with reference to the appendix. Figure 1 This includes steps 110 to 140: Step 110: Receive the installation package file and extract the icon path information of the installation package file; Step 120: Extract the icon file content based on the icon path information and identify the icon format type of the icon file content; Step 130: Based on the icon format type, select the corresponding target parser in the parser registry. The parser registry includes parsers for different types of icon formats, including parsers for XML format. Step 140: The icon file content is parsed using the target parser to obtain the parsing result, and then the display result is synthesized based on the parsing result.
[0021] As described above, this embodiment receives an installation package file, extracts the icon path information of the installation package file, extracts the icon file content based on the icon path information, identifies the icon format type of the icon file content, and selects a corresponding target parser in the parser registry center according to the icon format type. The parser registry center includes parsers corresponding to different types of icon formats, including an XML format parser. The target parser parses the icon file content to obtain the parsing result, and then synthesizes the display result based on the parsing result. Because the parser registry center includes parsers corresponding to different types of icon formats, this application can parse different types of icon formats, thus having a wide range of applications. Furthermore, since the parser registry center includes an XML format parser, it can parse XML format icon formats, avoiding blind attempts and invalid parsing, and reducing computational resource consumption. Further, by parsing the icon file content using the target parser to obtain the parsing result, this application can improve the accuracy of parsing, enabling fast parsing of multi-format installation package icons in a server-side Java environment, achieving high-precision and high-reliability multi-format icon parsing and synthesis.
[0022] In one embodiment of this application, step 120 involves extracting the icon file content based on the icon path information and identifying the icon format type of the icon file content, including steps 121 to 123.
[0023] Step 121: Obtain the file extension based on the icon path information; Step 122: Obtain the root tag based on the icon file content; Step 123: Obtain the icon format type based on the file extension and root tag. The icon format type includes XML icon format.
[0024] Specifically, when the file extension is XML, the XML file is parsed using DOM, analyzing the root element tag and attributes. When the root tag is vector, it is determined to be of type Vector Drawable; when the root tag is adaptive-icon, it is determined to be of type Adaptive Icon.
[0025] As described above, this embodiment determines the target icon format type based on the file extension and root tag. The file extension is used for initial screening of file types, and the root tag is used to refine the identification of the internal structure of XML, thereby accurately distinguishing icon formats such as Vector Drawable and Adaptive Icon. Thus, by combining the dual verification mechanism of file extension and root tag, it is possible to effectively avoid misjudgments that may be caused by a single identification method, improve the accuracy and robustness of icon format type identification, and ensure that subsequent processing steps are executed efficiently for specific formats.
[0026] In one embodiment of this application, step 120, which involves extracting the icon file content based on the icon path information and identifying the icon format type of the icon file content, further includes: The file header is obtained from the icon file content. It is then determined whether the file header contains PNG. If so, the icon format type is determined to be PNG. The file header is then determined whether it contains WEBP. If so, the icon format type is determined to be WEBP. Specifically, in this embodiment, the file is opened in binary mode and a sufficient number of bytes at the beginning of the file are read to extract feature data that can identify the file header. For example, the header of a PNG file contains a fixed sequence of bytes, and the header of a WEBP file contains a specific identifier. By comparing the read bytes with preset format features, if the PNG feature is matched, it is determined to be a PNG icon format, and if the WEBP feature is matched, it is determined to be a WEBP icon format.
[0027] As described above, this embodiment directly identifies the icon format type based on the file header features of the icon file content. The file header contains identification information for formats such as PNG or WEBP. By parsing the file header and matching it with preset format identifiers, the PNG icon format or WEBP icon format can be quickly and accurately determined. Thus, this method does not rely on file extensions and directly extracts key features from binary content, effectively avoiding recognition failures caused by missing or incorrect file extensions, and improving the reliability and efficiency of icon format type detection.
[0028] In one embodiment of this application, steps 310 to 320 are also included.
[0029] Step 310: Obtain the dynamic parser; Step 320: Check the validity of the dynamic parser. If valid, add the dynamic parser to the mapping table of the parser registry.
[0030] Specifically, during system runtime, parsers can be dynamically added for registration, and their validity can be checked. If valid, the parser is added to the mapping table of the parser registry. If invalid, the registration of the parser is rejected, and an error log is logged.
[0031] As described above, this embodiment ensures the basic functions of the system while providing scalability through a dynamic parser. This mechanism maintains good scalability, allowing new parsers to be added dynamically at runtime.
[0032] In one embodiment of this application, the method further includes: if the dynamic parser is not empty, then the dynamic parser is valid; setting the priority of the dynamically registered parser to obtain a new priority list; and sorting the new priority list using a sorting algorithm to obtain an ordered priority list.
[0033] As described above, in this embodiment, the parser registry center supports dynamic registration of parsers. A new parser is valid when it is not empty. It can be registered with the center and then set its own priority, forming a new priority list containing all registered parsers (including existing and newly added parsers). Subsequently, the system uses a sorting algorithm (such as comparison-based quicksort) to sort this new list in ascending order of priority values, ultimately generating a globally ordered list of parsers. This mechanism ensures that the calling order of the parser set remains correct according to the latest priority configuration after dynamic changes, thereby enhancing the system's scalability and flexibility.
[0034] In one embodiment of this application, before step 110, the method further includes: creating a parser registry; adding default parsers to the mapping table of the parser registry; wherein the default parsers include PNG parsers, AdaptiveIcon parsers, Vector Drawable parsers, and WEBP parsers.
[0035] For example, the mapping table in the parser registry is a key-value pair structure, which is optional. The structure is: (format identifier, corresponding parser object). When adding the default parser PNG parser, the PNG flag is used as the format identifier, and the PNG parser is used as the corresponding parser object. A record is added to the mapping table in the parser registry.
[0036] As described above, in this embodiment, by creating a parser registry center and pre-adding PNG parsers, Adaptive Icon parsers, Vector Drawable parsers, and WEBP parsers to the mapping table, this method establishes a standardized parser management mechanism during the initialization phase. This ensures that the parsing capabilities of various common icon formats are centrally registered and uniformly invoked, improving the system's scalability and maintainability, while providing reliable parser foundation support for subsequent icon parsing processes.
[0037] In one embodiment of this application, steps 610 to 620 are further included: Step 610: Calculate the priority of the parser in the mapping table according to the preset priority rules to obtain the priority list; wherein, the preset priority rules can be: PNG parser: priority 1 (highest); Adaptive Icon parser: priority 2; Vector Drawable parser: priority 3; WEBP parser: priority 4 (lowest).
[0038] Step 620: Sort the priority list using a sorting algorithm to obtain an ordered priority list; Step 130 involves selecting the corresponding target parser from the parser registry based on the icon format type, and also includes selecting the parser with the highest priority from the ordered priority list as the target parser.
[0039] As described above, in this embodiment, the smaller the priority value, the higher the priority. The priorities of the parsers in the mapping table are calculated using a preset priority rule, resulting in a list of parsers with priorities. All available parsers are collected from the mapping table in the parser registry, and each parser obtains its priority value through a method. Then, they are sorted in ascending order according to priority, ultimately returning an ordered list of priority parsers. This sorting mechanism ensures that the system attempts to parse parsers sequentially from highest to lowest priority.
[0040] In one embodiment of this application, step 140 involves parsing the icon file content using a target parser to obtain a parsing result, including: The parser is selected in order of priority from the list of ordered parsers to parse the contents of the icon file until parsing is successful or all parsers have been tried. If parsing is successful, the parsing result is output.
[0041] As described above, this embodiment provides a degradation processing mechanism. When an icon cannot be obtained through the normal parsing process, the degradation processing mechanism is activated to ensure that a default icon is always returned instead of direct failure. Based on the parser priority list, the parser is started with the highest priority parser and attempts are made to parse the icon file content sequentially. Once a parser successfully parses the file, the subsequent parsing process is immediately terminated and its parsing result is output, ensuring processing efficiency.
[0042] In one embodiment of this application, steps 810 to 830 are also included: Step 810: Determine if there is a parser type that is set to be parsed first. If so, parse the icon file content using the target parser corresponding to the parser type to obtain the parsing result. Step 820: If it does not exist, obtain the list of parsers and use the parsers in the list to parse the icon file content in turn; Step 830: If all parsers fail to parse, generate a default icon as the parsing result.
[0043] As described above, in this embodiment, the system first checks if a preset parser type exists to enable the target parser. If it doesn't exist, it iterates through the parser list and parses sequentially. If all parsers fail, a default icon is generated as the parsing result. Therefore, this method, combining priority parsing, sequential attempts, and degradation processing mechanisms, can efficiently adapt to various icon formats, ensuring the continuity and robustness of the parsing process in complex scenarios, avoiding system interruptions due to parsing failures, and improving overall processing efficiency and user experience. It also guarantees a returned result.
[0044] In one embodiment of this application, the method further includes: obtaining failure information or invalid information and logging it when the target parser fails to parse or the dynamically registered parser is invalid.
[0045] As described above, this embodiment introduces a fault tolerance and logging mechanism. When the selected target parser fails to parse the icon file, or when the parser dynamically registered to the system itself has errors, incompatibilities, or other invalidities, the system captures the corresponding exception or error status and obtains failure or invalid information including the reason for parsing failure, parser identifier, and details of the invalid parser. Subsequently, the system writes this information to the log system. This mechanism provides crucial information for system monitoring, troubleshooting, and operational status analysis, enhancing the system's maintainability and robustness.
[0046] Applying the above-mentioned method for processing installation package icons to a real-world scenario, the following section combines... Figure 4 , Figure 5 , Figure 6 Please provide a detailed explanation.
[0047] Figure 4 Here is a flowchart of the parser registration and management mechanism. Figure 4 This represents two different parser registration processes. Figure 4 The left side shows the initialization process of a default parser. Figure 4 The right side shows a dynamic registration process.
[0048] Figure 5 Flowchart for selecting a format recognition and parser. Figure 5 This represents the complete process from inputting an APK file, selecting a parser, executing the parsing, and returning the parsing results.
[0049] Figure 6 This is a flowchart illustrating a degradation processing method for processing installation package icons, provided in an embodiment of the present invention. When the system cannot obtain the icon through the normal parsing process, a degradation processing mechanism is initiated to ensure that a default icon is always returned instead of direct failure. First, the system attempts a user-specified priority type parser. Other parsers are then tried according to priority. If the priority parser fails, the system attempts all other registered parsers in priority order. During each parser attempt, the system captures any possible exceptions. Log information of parsing failures is recorded for problem diagnosis. When all parsers have failed, the system calls a method to generate and return a default icon.
[0050] The following details the steps for applying the above-mentioned method for processing installation package icons in a real-world scenario, including steps a through d: Step a: After starting the system running one of the above-described methods for handling installation package icons in the server-side Java environment, refer to... Figure 4First, the parsing engine is initialized. Then, a parser registry is created, and default parsers (PNG, Adaptive Icon, Vector Drawable, and WEBP) are added to the registry. Priorities are set by default: PNG parser priority is 1, Adaptive Icon parser priority is 2, Vector Drawable parser priority is 3, and WebP parser priority is 4. At system runtime, a second Vector Drawable parser is dynamically added, with its priority set to 0.
[0051] Step b: The system reads an APK file, see [link / reference] Figure 5 Extract the icon path information from the APK file (corresponding to step 110 above), and determine the icon format type of the extracted icon path information. For example, when the extension is XML, read the root tag of the XML file. If the root tag read is vector, determine that it is in Vector Drawable format (corresponding to step 120 above).
[0052] Step c: Select the second Vector Drawable parser to parse the XML file (corresponding to step 130 above). If the parsing fails, record the failure log and try the next parser to parse the file. Use the default Vector Drawable parser (priority 3). If the parsing succeeds, return the parsing result and use SVG path parsing, transformation matrix management and vector rendering to composite and display the result based on the parsing result (corresponding to step 140 above).
[0053] Step d: See Figure 6 If parsing fails, other parsers are tried in descending order of priority. The PNG parser (priority 1) is used first; if this fails, a failure log is logged, and the Adaptive Icon parser (priority 2) is attempted. If that also fails, the WebP parser (priority 4) is attempted. During each parser attempt, any exceptions that may occur are caught. If all parsers fail, a default icon generation method is called to generate and return a default icon. After this process is complete, the second Vector Drawable parser is unregistered.
[0054] Please refer to Figure 2 The present invention also provides a server 400, including a memory 402, a processor 401, and a computer program stored on the memory 402 and running on the processor 401. When the processor 401 executes the computer program, it implements the various steps in the installation package icon processing method described above. The beneficial effects of the electronic device of the present invention are the same as those of the method described above, and will not be repeated here.
[0055] Please refer to Figure 3 This application also provides an installation package icon processing device 300, applied to a server, wherein the server is connected to a parser registration center, and the parser registration center includes parsers corresponding to different types of icon formats, including XML format parsers; The device includes a path recognition module 301, a format recognition module 302, a parser selection module 303, and a parsing processing module 304. The path recognition module is used to receive the installation package file and extract the icon path information of the installation package file; The format recognition module is used to extract the icon file content based on the icon path information and identify the icon format type of the icon file content; The parser selection module is used to select the corresponding target parser from the parser registry center based on the icon format type. The parsing and processing module is used to parse the content of the icon file through the target parser, obtain the parsing result, and then synthesize the display result based on the parsing result.
[0056] The aforementioned installation package icon processing system can implement the aforementioned installation package icon processing method, and its corresponding beneficial effects are the same as those of the aforementioned installation package icon processing method, which will not be repeated here.
[0057] As described above, this embodiment, by setting a format recognition module, can identify icon format types by comprehensively considering both icon path information and file content information. Compared to a single recognition method, this enhances the accuracy and robustness of format recognition and effectively avoids recognition failures caused by missing or incorrect path information. The parser selection module dynamically selects the corresponding target parser based on the accurately identified format type, achieving precise matching between the parser and the icon format and avoiding errors that may be caused by using incompatible parsers. The parsing processing module initiates a degradation processing flow when the target parser fails to parse, providing a fault tolerance mechanism to ensure that the system can still provide basic processing results when encountering abnormal or unexpected icon files, thereby ensuring the overall availability and stability of the system. In particular, the dynamic registration module included in the parser registry center allows new parsers to be dynamically extended and registered during system runtime, giving the system good scalability. New icon formats can be supported without modifying the core system code or restarting the service, significantly reducing the cost and complexity of system maintenance and upgrades.
[0058] In summary, this invention proposes a method, processing device, and server for processing installation package icons. By constructing a parser registry center and integrating path recognition, format recognition, parser selection, and parsing processing modules into the icon processing device, the device can support parsing various mainstream and emerging icon formats such as PNG, Adaptive Icon, Vector Drawable, and WEBP. Parsing efficiency is improved by accurately determining the icon type through the format recognition module and directly calling the matching target parser through the intelligent selection algorithm of the parser selection module, avoiding blind attempts and invalid parsing, and reducing computational resource consumption. The system is given scalability; the dynamic registration module built into the parser registry center allows for seamless expansion of new parsers to support future new formats during system runtime without modifying the core code of the device. Good backward compatibility is ensured; while introducing new format support, the parsing function of existing formats such as PNG is fully retained, ensuring a smooth transition of the technical solution. Simultaneously, a robust degradation mechanism guarantees stability.
[0059] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention's specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for processing installation package icons, characterized in that, Applied to the server side, the method includes: Receive the installation package file and extract the icon path information of the installation package file; Extract the icon file content based on the icon path information, and identify the icon format type of the icon file content; Based on the icon format type, select the corresponding target parser in the parser registry. The parser registry includes parsers corresponding to different icon formats, including parsers for XML format. The icon file content is parsed by the target parser to obtain the parsing result, and the display result is synthesized based on the parsing result.
2. The method for processing installation package icons according to claim 1, characterized in that, The step of extracting icon file content based on the icon path information and identifying the icon format type of the icon file content includes: The file extension is obtained based on the icon path information; The root tag is obtained based on the contents of the icon file; The icon format type is obtained based on the file extension and the root tag, and the icon format type includes XML icon format.
3. The method for processing installation package icons according to claim 1, characterized in that, Also includes: Obtain the dynamic parser; Check the validity of the dynamic parser. If valid, add the dynamic parser to the mapping table of the parser registry.
4. The method for processing installation package icons according to claim 3, characterized in that, The check of the validity of the dynamic parser includes: If the dynamic parser is not empty, then the dynamic parser is valid.
5. The method for processing installation package icons according to claim 1, characterized in that, Before selecting the corresponding target parser in the parser registry, the process also includes: Create a parser registry center; Add the default resolver to the mapping table of the resolver registry.
6. The method for processing installation package icons according to claim 5, characterized in that, Also includes: The priority list is obtained by calculating the priority of each parser in the mapping table according to the preset priority rules; The priority list is sorted using a sorting algorithm to obtain an ordered priority list; The step of selecting the corresponding target parser in the parser registry center according to the icon format type also includes: Select the parser with the highest priority from the ordered priority list as the target parser.
7. The method for processing installation package icons according to claim 6, characterized in that, Also includes: The parser is selected according to the order of the ordered priority list to parse the icon file content until parsing is successful or all parsers have been tried. If parsing is successful, the parsing result is output.
8. The method for processing installation package icons according to claim 1, characterized in that, Also includes: Determine if there is a parser type that is set to be parsed first. If so, parse the icon file content using the target parser corresponding to the parser type to obtain the parsing result. If it does not exist, obtain a list of parsers and use the parsers in the list to parse the contents of the icon file in turn; If all parsers fail to parse, a default icon is generated as the parsing result.
9. An installation package icon processing device, characterized in that, Applied to the server side, the server side connects to the parser registry center, which includes parsers corresponding to different types of icon formats, including parsers for XML format; The device includes: a path recognition module, a format recognition module, a parser selection module, and a parsing processing module. The path recognition module is used to receive the installation package file and extract the icon path information of the installation package file; The format recognition module is used to extract the icon file content based on the icon path information and identify the icon format type of the icon file content; The parser selection module is used to select the corresponding target parser in the parser registration center according to the icon format type; The parsing processing module is used to parse the content of the icon file through the target parser, obtain the parsing result, and then synthesize the display result based on the parsing result.
10. A server comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the installation package icon processing method according to any one of claims 1 to 8.