Icon processing method, device, electronic device and storage medium
By converting icons into target components and building target product packages, the problem of low icon reusability and convenience is solved, and the ability to adjust multi-color icons and dynamic styles is achieved.
Patent Information
- Application Number
- CN202211321002.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-10-26
AI Technical Summary
In the prior art, the reusability and convenience of icons are low, the font file method cannot support multi-color icons, and the icon source file method cannot adjust the dynamic style of the icon.
By converting icons into target components with style adjustment capabilities and building target product packages based on these components, we can achieve the style adjustment and reusability of icons.
Improves the reusability and convenience of icons during use, and supports multi-color icons and dynamic style adjustments.
Smart Images

Figure CN115657899B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of icon processing, and in particular to an icon processing method, device, electronic device and storage medium. Background Art
[0002] During the operation of terminal devices such as mobile phones and computers, various elements are displayed on their display interfaces, such as text, backgrounds, icons, etc. Among them, icons can be functional identification controls, such as application icons, homepage icons, etc.
[0003] According to relevant technology, current icon usage methods include font file method and icon source file method. However, the font file method cannot support the implementation of multi-color icons, and the icon source file method cannot dynamically adjust the icon style, which will reduce the reusability and convenience of icons during use. Summary of the Invention
[0004] The present invention provides an icon processing method, device, electronic device and storage medium to solve the defects of low reusability and low convenience of icons during use in the prior art, thereby improving the reusability and convenience of icons during use.
[0005] The present invention provides an icon processing method, which includes: obtaining an icon to be processed; using a preset tool to convert the icon to be processed into a target component, wherein the target component corresponds to the icon to be processed and has the ability to adjust the style of the icon to be processed; based on the target component, constructing a target product package; based on the target product package, obtaining a target icon, wherein the target icon is an icon to be processed with the ability to adjust the style.
[0006] According to an icon processing method provided by the present invention, the target icon is obtained based on the target product package, which specifically includes: obtaining a target instruction, wherein the target instruction is an instruction for the introduction method of the target product package; based on the target instruction, introducing the target product package for use to obtain the target icon.
[0007] According to an icon processing method provided by the present invention, the target instruction includes a first target instruction, which is an instruction for introducing the target product package in a full-scale introduction manner; the target icon includes a first target icon set, which is a set of icons corresponding to each of the target components in the target product package; introducing the target product package for use based on the target instruction to obtain the target icon specifically includes: based on the first target instruction, introducing the target product package for use in a full-scale introduction manner to obtain the first target icon set.
[0008] According to an icon processing method provided by the present invention, the target instruction includes a second target instruction, and the second target instruction is an instruction for introducing a preset target component in a partial introduction manner, wherein the partial introduction manner is a manner of introducing the preset target component in the target product package according to user needs, and the preset target component is a target component in the target product package that meets user needs; the target icon includes a second target icon set, and the second target icon set is a set composed of icons corresponding to the preset target components respectively; the target product package is introduced for use based on the target instruction to obtain the target icon, specifically including: based on the second target instruction, the preset target component in the target product package is introduced for use in a partial introduction manner to obtain the second target icon set.
[0009] According to an icon processing method provided by the present invention, after the target product package is introduced for use to obtain the target icon, the icon processing method further includes: obtaining a style adjustment instruction, wherein the style adjustment instruction is an instruction for adjusting the style of the target icon; based on the style adjustment instruction, determining the adjustment properties of the target component corresponding to the style adjustment instruction; based on the adjustment properties of the target component, adjusting the target icon to obtain an adjusted target icon.
[0010] According to an icon processing method provided by the present invention, the icon to be processed is converted into a target component using a preset tool, specifically comprising: using the preset tool to parse and obtain the icon attributes to be processed of the icon to be processed; determining the target component attributes corresponding to the icon attributes to be processed based on a mapping table pre-set by the preset tool, wherein the mapping table includes a mapping relationship between icon attributes and component attributes; and determining the target component based on the target component attributes.
[0011] According to an icon processing method provided by the present invention, the icon to be processed is determined in the following manner: obtaining an initial icon; when the initial icon meets the preset icon specification, standardizing the initial icon to obtain the icon to be processed, wherein the icon to be processed is an icon with a preset structure.
[0012] The present invention also provides an icon processing device, which includes: an acquisition module for acquiring an icon to be processed; a conversion module for using a preset tool to convert the icon to be processed into a target component, wherein the target component corresponds to the icon to be processed and the target component has the ability to adjust the style of the icon to be processed; a construction module for constructing a target product package based on the target component; and a generation module for obtaining a target icon based on the target product package, wherein the target icon is an icon to be processed with the ability to adjust the style.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described icon processing methods when executing the program.
[0014] The present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned icon processing methods when executed by a processor.
[0015] The present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned icon processing methods.
[0016] The icon processing method, device, electronic device, and storage medium provided by the present invention convert an icon to be processed into a target component capable of adjusting the style of the icon to be processed based on a preset tool, and construct a target product package corresponding to the multiple icons to be processed based on multiple target components. Because the target component has the ability to adjust the style of the icon to be processed, the constructed target product package also has the ability to adjust the style of the icon to be processed. Therefore, based on the target product package, target icons with style adjustment capabilities can be produced, thereby improving the reusability and convenience of the same target icon during use. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is one of the flowcharts of the icon processing method provided by the present invention;
[0019] Figure 2 This is the second flowchart of the icon processing method provided by the present invention;
[0020] Figure 3 This is the third flow chart of the icon processing method provided by the present invention;
[0021] Figure 4 It is a schematic diagram of the process of converting the icon to be processed into the target component provided by the present invention;
[0022] Figure 5 This is a schematic diagram of a process for constructing a target product package corresponding to a plurality of icons to be processed, provided by the present invention;
[0023] Figure 6 It is a structural diagram of the icon to be processed provided by the present invention;
[0024] Figure 7 This is the fourth flow chart of the icon processing method provided by the present invention;
[0025] Figure 8 It is a structural diagram of the icon processing device provided by the present invention;
[0026] Figure 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0028] The icon processing method provided by the present invention unifies the icon source file format into a preset format, obtains the icon to be processed through operations such as parsing and standardization, and then constructs the icon to be processed into a target component, wherein the target component can be a Vue component, and is published as an NPM package (corresponding to a target product package) based on multiple target components. Since the target component has the ability to adjust the style of the icon to be processed, the constructed target product package also has the ability to adjust the style of the icon to be processed, so that a target icon with style adjustment capability can be produced based on the target product package, thereby improving the reusability and convenience of the same target icon during use.
[0029] In order to further introduce the icon processing method provided by the present invention, the following Figure 1 Provide explanation.
[0030] Figure 1 This is one of the flow charts of the icon processing method provided by the present invention.
[0031] In an exemplary embodiment of the present invention, Figure 1 It can be seen that the icon processing method may include steps 110 to 140, and each step will be introduced below.
[0032] In step 110 , an icon to be processed is obtained.
[0033] In an exemplary embodiment of the present invention, the icon to be processed may be determined in the following manner:
[0034] Get the initial icon;
[0035] In the case that the initial icon meets the preset icon specification, the initial icon is standardized to obtain an icon to be processed, wherein the icon to be processed is an icon with a preset structure.
[0036] In one embodiment, the initial icon can be understood as a pre-designed icon. However, the initial icon does not necessarily meet the criteria for conversion into the icon to be processed. During the application process, it can be verified whether the initial icon meets the preset icon specifications. In one example, when the initial icon meets the preset icon specifications, the initial icon can be standardized so that the resulting icon to be processed has a preset structure. It is understandable that the icon to be processed can also be a source file in a preset file format, for example, a source file in SVG format. In this embodiment, the specific form of the icon to be processed is not limited.
[0037] It should be noted that the preset icon specifications can be adjusted according to actual conditions. For example, the preset icon specifications can be accurate, concise, and uniform in size. Accuracy refers to the graphical representation of information that can accurately express the meaning of the icon; accurate on-screen display, and reduced appearance of jagged edges. Conciseness refers to removing unnecessary details while ensuring the meaning. Uniform size refers to ensuring the uniformity of icon size, line thickness, emotional characteristics, endpoint characteristics, corner characteristics, tilt angle, basic shape, etc. For example, a uniform aspect ratio of 1:1. In this embodiment, no specific limitation is made to the icon specifications.
[0038] The preset structure can also be adjusted according to actual conditions. In this embodiment, no specific limitation is made to the preset structure.
[0039] Figure 6 This is a schematic diagram of the structure of the icon to be processed provided by the present invention. Figure 6 Provide examples of preset structures.
[0040] In one embodiment, combining Figure 6It can be seen that the preset structure can be that the icon to be processed includes an outer stroke area 10, an outer fill area 20, an inner stroke area 30, and an inner fill area 40. In one example, the outer stroke area 10 can be set to a first preset color number, the outer fill area 20 can be set to a second preset color number, the inner stroke area 30 can be set to a third preset color number, and the inner fill area 40 can be set to a fourth preset color number.
[0041] It can be understood that the preset color numbers corresponding to different areas in the preset structure can identify the icon attributes to be processed of the icon to be processed. During the application process, when it is determined that a certain area is the first preset color number, this area can be characterized as the external stroke area 10. Further, based on the external stroke area 10, the target component attributes of the target component corresponding to the icon to be processed can be determined, and based on the target component attributes, the target component can be determined. In this embodiment, the icon to be processed is obtained by standardizing the initial icon, which can facilitate the determination of the icon attributes to be processed of the icon to be processed, and thus lay the foundation for determining the target component attributes of the target component based on the icon attributes to be processed.
[0042] In step 120, a preset tool is used to convert the icon to be processed into a target component, wherein the target component corresponds to the icon to be processed and has the ability to adjust the style of the icon to be processed.
[0043] In step 130 , a target artifact package is constructed based on the target component.
[0044] In step 140 , a target icon is obtained based on the target product package, wherein the target icon is an icon to be processed with a style adjustment capability.
[0045] In one example, the target product package can be a product package that can be published to an NPM server. During the application process, the target product package is published to the NPM server, which can facilitate subsequent downloading of the target product package from the NPM server for installation and introduction.
[0046] In one embodiment, a preset tool can be used to convert the icon to be processed into a target component capable of adjusting the style of the icon to be processed. The ability to adjust the style of the icon to be processed can be understood as the ability to perform multi-color and style adjustments on the target component, such as adjusting the icon color, adjusting the stroke thickness, and adjusting the orientation of the icon. The preset tool can be a CLI tool capable of converting the icon to be processed into the target component.
[0047] Furthermore, based on multiple target components, a target product package corresponding to multiple icons to be processed is constructed, which can produce target icons with style adjustment capabilities based on the target product package, thereby improving the reusability and convenience of the same target icon during use.
[0048] It should be noted that the constructed target artifact package can be understood as a process of producing target icon assets. Based on the target artifact package, a target icon with high reusability and convenience can be obtained.
[0049] Furthermore, obtaining the target icon based on the target product package can be understood as a process of target icon consumption. During the target icon consumption process, the reusability and convenience of the target icon are improved.
[0050] The icon processing method provided by the present invention uses a preset tool to convert an icon to be processed into a target component capable of adjusting the style of the icon to be processed. Based on multiple target components, a target product package corresponding to the multiple icons to be processed is constructed. Because the target component has the ability to adjust the style of the icon to be processed, the constructed target product package also has the ability to adjust the style of the icon to be processed. Therefore, based on the target product package, target icons with style adjustment capabilities can be produced, thereby improving the reusability and convenience of the same icon during use.
[0051] In order to further introduce the icon processing method provided by the present invention, the following Figure 2 Provide explanation.
[0052] Figure 2 This is the second flowchart of the icon processing method provided by the present invention.
[0053] In an exemplary embodiment of the present invention, Figure 2 It can be seen that the icon processing method may include steps 210 to 250, wherein steps 210 to 230 are the same or similar to steps 110 to 130 described above. For their specific implementation methods and beneficial effects, please refer to the above description. They will not be repeated in this embodiment. Steps 240 and 250 will be introduced below respectively.
[0054] In step 240 , a target instruction is obtained, wherein the target instruction is an instruction for how to introduce the target product package.
[0055] In step 250 , based on the target instruction, the target artifact package is imported for use to obtain a target icon.
[0056] In one embodiment, a user's target instruction can be obtained. The target instruction can be understood as the method for using the target component in the target product package. For example, when a user needs to obtain a partial target icon, the partial target component in the target product package can be referenced and used to obtain the partial target icon corresponding to the partial target component. In this way, while meeting user needs, the amount of data running can be reduced, thereby improving the processing efficiency of obtaining the target icon.
[0057] It is understandable that the target instruction can be adjusted according to actual conditions. The following will introduce the process of introducing the target product package based on the target instruction to obtain the target icon in application scenarios with different target instructions.
[0058] In an exemplary embodiment of the present invention, the target instruction may include a first target instruction, wherein the first target instruction is an instruction for importing the target product package in a full import mode. The target icon may include a first target icon set, wherein the first target icon set is a set of icons corresponding to respective target components in the target product package.
[0059] Based on the target instruction, the target artifact package is introduced for use to obtain the target icon. This can be achieved in the following ways:
[0060] Based on the first target instruction, the target product package is introduced in full for use to obtain a first target icon set.
[0061] In one embodiment, when a user needs to process all of the icons to be processed, a first target instruction can be initiated, i.e., a full import method can be used to import the target product package. Since the target product package includes all of the target components corresponding to the icons to be processed, importing the target product package in full can meet the user's needs, i.e., obtain a first target icon set. The first target icon set is a set of icons corresponding to each target component in the target product package, and can also be understood as a set of target icons corresponding to all of the icons to be processed.
[0062] In this embodiment, since the target product package has the ability to adjust the style of the icon to be processed, the target product package is introduced in full for use, which can improve the reusability and convenience of each target icon in the first target icon set during use.
[0063] In another exemplary embodiment of the present invention, the target instruction may include a second target instruction, wherein the second target instruction is an instruction for introducing a preset target component in a partial introduction manner. The partial introduction manner is a manner of introducing the preset target component in the target product package according to user needs. The preset target component is the target component in the target product package corresponding to the partial introduction manner, and can also be understood as the target component in the target product package that meets the user needs. The target icon may include a second target icon set, wherein the second target icon set is a set of icons corresponding to the preset target components.
[0064] It should be noted that user needs can be determined based on the user's actual situation. For example, based on user needs, it can be determined that target component A and target component B need to be introduced into the target product package, where target component A and target component B can be understood as preset target components.
[0065] Based on the target instruction, the target artifact package is introduced for use to obtain the target icon. This can be achieved in the following ways:
[0066] Based on the second target instruction, the preset target component in the target product package is introduced in a partial introduction manner for use to obtain a second target icon set.
[0067] In one embodiment, when a user needs to process some of the icons to be processed, a second target instruction can be initiated, i.e., a target product package can be introduced in a partial import manner. Since the target product package includes some of the preset target components corresponding to the icons to be processed, introducing the target product package in a partial import manner can meet the user's needs, i.e., obtain a second target icon set. The second target icon set is a set of icons corresponding to the preset target components, which can also be understood as a set of target icons corresponding to some of the icons to be processed.
[0068] Through this embodiment, the data running amount can be reduced while meeting the user's needs, and the processing efficiency of obtaining the target icon can be improved. In addition, the obtained target icon has high reusability and high convenience during use.
[0069] Figure 3 This is the third flow chart of the icon processing method provided by the present invention.
[0070] The following will be combined Figure 3 The process of icon processing method is explained.
[0071] In an exemplary embodiment of the present invention, the icon processing method may include steps 310 to 380, wherein steps 310 to 350 are the same as or similar to steps 210 to 250. For their specific implementation and beneficial effects, please refer to the previous description, which will not be repeated in this embodiment. Steps 360 to 380 will be introduced separately below.
[0072] In step 360 , a style adjustment instruction is obtained, wherein the style adjustment instruction is an instruction for adjusting the style of the target icon.
[0073] In one embodiment, to meet user requirements and achieve icon reusability, user-initiated style adjustment instructions can be obtained during the application process. The style adjustment instructions can be determined based on actual conditions, for example, adjusting the icon color, adjusting the stroke thickness, or adjusting the rotation direction of the icon.
[0074] In step 370 , based on the style adjustment instruction, an adjustment property of the target component corresponding to the style adjustment instruction is determined.
[0075] In step 380 , the target icon is adjusted based on the adjustment properties of the target component to obtain an adjusted target icon.
[0076] In one embodiment, the adjustment properties of the target component corresponding to the style adjustment instruction can be determined based on the style adjustment instruction. In one example, if the style adjustment instruction is to adjust the color of the icon, the adjustment properties of the target component can be properties related to adjusting the color of the icon. During the application process, the target icon is adjusted through the adjustment properties of the target component to obtain an adjusted target icon. In this embodiment, the adjustment properties are determined based on the style adjustment instruction, and then the target component is adjusted based on the adjustment properties, so that the target icon can be adjusted quickly and conveniently, thereby realizing the reusability and portability of the target icon during the application process.
[0077] In order to further introduce the icon processing method provided by the present invention, the following Figure 4 Provide explanation.
[0078] Figure 4 It is a flow chart of converting an icon to be processed into a target component provided by the present invention.
[0079] In an exemplary embodiment of the present invention, Figure 4 It can be seen that converting the icon to be processed into the target component using the preset tool may include step 410 and step 430, and each step will be introduced below.
[0080] In step 410, a preset tool is used to parse and obtain the icon attributes to be processed of the icon to be processed.
[0081] In one embodiment, the icon attributes of the icon to be processed can be determined. Figure 6 To illustrate, when it is determined that a certain area is the first preset color number, this area can be characterized as the outer stroke area 10. The first preset color number of the icon to be processed can be characterized as the attribute of the icon to be processed. Since the preset mapping table includes a mapping relationship between icon attributes and component attributes, for example, the first preset color number corresponds to the outer stroke area 10. Furthermore, based on the outer stroke area 10, the target component attribute of the target component corresponding to the icon to be processed can be determined, that is, the area covered by the first preset color number is the outer stroke area 10. Based on the target component attribute, the target component can be determined.
[0082] In step 420, based on a mapping table preset by a preset tool, target component attributes corresponding to the icon attributes to be processed are determined, wherein the mapping table includes a mapping relationship between icon attributes and component attributes.
[0083] In step 430 , a target component is determined based on the target component attributes.
[0084] In one embodiment, the icon attribute to be processed may be one of the icon attributes in the mapping table, and the target component attribute may be one of the component attributes in the mapping table. Since the mapping table includes component attributes corresponding to each icon attribute, the target component attribute corresponding to the icon attribute to be processed in the icon attributes can be determined based on the mapping table.
[0085] Once the target component attributes of the target component are determined, the target component can be accurately and uniquely determined based on the target component attributes. Since the target component attributes correspond to the to-be-processed icon attributes of the to-be-processed icon, the target component determined based on the target component attributes can correspond to the to-be-processed icon.
[0086] It should be noted that the adjustment properties of the target component can be understood as properties related to adjusting the properties of the target component. Once the adjustment properties are determined, it can be determined how to adjust the properties of the target component. During application, the target icon can be adjusted by adjusting the properties of the target component, such as adjusting the color, adjusting the stroke thickness, etc., so that the adjusted target icon can be quickly and conveniently obtained. Through this embodiment, the reusability and portability of the same icon during use can be improved.
[0087] It can be understood that the preset tool is a tool for processing and converting icons, which has the following functions:
[0088] By parsing the icon to be processed, its attributes can be obtained. A mapping table is pre-set, based on which the target component attributes corresponding to the icon attributes to be processed can be determined, and based on the target component attributes, the target component can be determined.
[0089] Among them, the icons to be processed can be extracted from the SVG source file, and the preset tool can support the verification, standardization and construction of the SVG source file into a Vue component.
[0090] In order to further introduce the icon processing method provided by the present invention, the following Figure 5 Provide explanation.
[0091] Figure 5 It is a schematic diagram of the process of constructing a target product package corresponding to multiple icons to be processed provided by the present invention.
[0092] In an exemplary embodiment of the present invention, Figure 5 It can be seen that constructing a target product package corresponding to a plurality of icons to be processed may include steps 510 to 590 , and each step will be described below.
[0093] In step 510 , an artifact catalog of the target artifact package is created.
[0094] In one embodiment, a product catalogue can be created, based on which the composition of the target product package can be understood. In one example, the product catalogue can include vetur (code hint), docs (use documentation) and components (icon components) etc.
[0095] In step 520, a static file is copied, wherein the static file includes a mapping table.
[0096] In step 530 , based on the icon to be processed, the icon attribute to be processed of the icon to be processed is determined.
[0097] In step 540 , target component attributes corresponding to the icon attributes to be processed are determined based on a mapping table, wherein the mapping table includes a mapping relationship between icon attributes and component attributes.
[0098] In step 550 , a target component is determined based on the target component attributes.
[0099] In one embodiment, a static file may be copied, wherein the static file includes a mapping table. It should be noted that the mapping table includes a mapping relationship between icon attributes and component attributes.
[0100] During the application process, since the mapping table includes component attributes corresponding to respective icon attributes, further, the target component attribute corresponding to the icon attribute to be processed in the icon attribute can be determined based on the mapping table.
[0101] Once the target component attributes of the target component are determined, the target component can be accurately and uniquely determined based on the target component attributes. Since the target component attributes correspond to the to-be-processed icon attributes of the to-be-processed icon, the target component determined based on the target component attributes can correspond to the to-be-processed icon.
[0102] In one example, width and height can be matched and replaced with the two-way binding attribute size. Read multiColor in the global configuration style ICON_STYLE. Among them, multiColor can be understood as the icon attribute to be processed of the icon to be processed. Furthermore, the value of the matched stroke is replaced by the two-way binding attribute outStroke; the value of the matched fill is replaced by the two-way binding attribute outFill; the value of the matched stroke is replaced by the two-way binding attribute innerStroke; the value of the matched fill is replaced by the multiColor.innerStroke value by the two-way binding attribute innerFill. It can be understood that the matching correspondence is the mapping relationship in the mapping table described above. In this embodiment, the icon to be processed can be converted into the target component by determining the target component attribute corresponding to the icon attribute to be processed, and then determining the target component based on the target component attribute.
[0103] It should be noted that the adjustment properties of the target component can be understood as properties related to adjusting the properties of the target component. Once the adjustment properties are determined, it can be determined how to adjust the properties of the target component. During the application process, the target icon can be adjusted by adjusting the properties of the target component, such as adjusting the color, adjusting the stroke thickness, etc., so that the adjusted target icon can be obtained quickly and conveniently. Through this embodiment, the reusability and portability of the same icon during use can be improved, and dynamic modification of the icon style at runtime can be supported.
[0104] In step 560, an entry file is generated.
[0105] In step 570, a code hint file is generated.
[0106] In step 580, usage documentation is constructed.
[0107] In step 590, a target artifact package is obtained based on the target component, the entry file, the code hint file, and the usage document.
[0108] In one embodiment, an entry file, code prompt file, and usage documentation can also be generated based on the static file. A target product package is then generated based on the target component, entry file, code prompt file, and usage documentation. Because the target component has the ability to adjust the style of the icon to be processed, the target product package also has the ability to adjust the style of the icon to be processed. Thus, icons with style adjustment capabilities can be produced based on the target product package, thereby improving the reusability and convenience of the same icon during use.
[0109] Figure 7 This is the fourth flowchart of the icon processing method provided by the present invention. Figure 7 Provide explanation.
[0110] In an exemplary embodiment of the present invention, Figure 7 It can be seen that the icon processing method may include steps 710 to 770, and each step will be introduced below.
[0111] In step 710 , the icon global style specification is matched.
[0112] In step 720, an icon is designed.
[0113] In one embodiment, the global icon style specification can be understood as the preset icon specification described above. For example, the preset icon specification can be accurate, concise, and uniform in size. Accurate means that the information is graphically displayed, which can accurately express the meaning of the icon; the screen display is accurate, and the appearance of jagged edges is reduced. Concise means removing unnecessary details while ensuring the meaning. Uniform size means ensuring the uniformity of icon size, line thickness, emotional characteristics, endpoint characteristics, corner characteristics, tilt angle, basic shape, etc. For example, the aspect ratio is unified to 1:1. In this embodiment, no specific limitation is made to the icon specification.
[0114] Furthermore, redesign the icon (corresponding to the initial icon).
[0115] In step 730 , it is checked whether the icon complies with the preset icon specification.
[0116] In step 740 , if the icon meets the preset icon specification, the icon is standardized to obtain an icon to be processed.
[0117] In one embodiment, the initial icon can be understood as a pre-designed icon, but the initial icon does not necessarily meet the criteria (corresponding specifications) for conversion to the icon to be processed. During the application process, the icon can be verified to see if it meets the preset icon specifications. In one example, when the initial icon meets the preset icon specifications, the initial icon can be standardized so that the resulting icon to be processed has a preset structure.
[0118] In another embodiment, if the initial icon does not meet the preset icon specifications, the process may return to step 720 to redesign the icon until the icon meets the preset icon specifications.
[0119] In step 750, the icon to be processed is converted to obtain a target component.
[0120] In step 760 , a target artifact package is obtained based on the target component, and the target artifact package is published.
[0121] In step 770 , the target artifact package is installed and used to obtain the target icon.
[0122] In one embodiment, the icon to be processed can be converted into a target component that has the ability to adjust the style of the icon to be processed. The ability to adjust the style of the icon to be processed can be understood as the ability to perform multi-color adjustment and style adjustment on the target component, such as adjusting the icon color, adjusting the stroke thickness of the icon, and adjusting the direction of the icon. Furthermore, based on multiple target components, a target product package corresponding to multiple icons to be processed is constructed, which can achieve the production of icons with style adjustment capabilities based on the target product package, thereby improving the reusability and convenience of the icons during use.
[0123] As can be seen from the above description, the icon processing method provided by the present invention converts the icon to be processed into a target component capable of adjusting the style of the icon to be processed, and constructs a target product package corresponding to the multiple icons to be processed based on multiple target components. Because the target component has the ability to adjust the style of the icon to be processed, the constructed target product package also has the ability to adjust the style of the icon to be processed. Therefore, based on the target product package, icons with style adjustment capabilities can be produced, thereby improving the reusability and convenience of icons during use.
[0124] Based on the same concept, the present invention also provides an icon processing device.
[0125] The icon processing device provided by the present invention is described below. The icon processing device described below and the icon processing method described above can be referenced to each other.
[0126] Figure 8 It is a structural diagram of the icon processing device provided by the present invention.
[0127] In an exemplary embodiment of the present invention, Figure 8 It can be seen that the icon processing device may include an acquisition module 810, a conversion module 820, a construction module 830 and a generation module 840, and each module will be introduced below.
[0128] The acquisition module 810 may be configured to acquire an icon to be processed;
[0129] The conversion module 820 may be configured to convert the icon to be processed into a target component using a preset tool, wherein the target component corresponds to the icon to be processed and has the ability to adjust the style of the icon to be processed;
[0130] The construction module 830 may be configured to construct a target artifact package based on the target component;
[0131] The generating module 840 may be configured to obtain a target icon based on the target product package, wherein the target icon is an icon to be processed with a style adjustment capability.
[0132] It should be noted that a device for constructing a target product package can also be obtained based on the acquisition module 810, the conversion module 820 and the construction module 830. Among them, the device for constructing a target product package can construct a target product package corresponding to multiple icons to be processed. It should be noted that the device for constructing a target product package can be a command line interface (CLI) tool. During the application process, the CLI tool can support the verification, standardization and construction of the SVG source file (corresponding to the icon to be processed) into the corresponding Vue component (corresponding to the target component), and form a target product package based on the target component.
[0133] It is understandable that the target product package constructed based on the device for constructing the target product package can produce icons with high reusability and convenience, thereby improving the reusability and convenience of the icons during use.
[0134] In an exemplary embodiment of the present invention, the generating module 840 may also be configured to:
[0135] Obtaining a target instruction, wherein the target instruction is an instruction for introducing a target product package;
[0136] Based on the target instruction, the target artifact package is introduced for use to obtain the target icon.
[0137] In an exemplary embodiment of the present invention, the target instruction may include a first target instruction, which is an instruction for introducing the target product package in a full import manner; the target icon may include a first target icon set, which is a set of icons corresponding to respective target components in the target product package;
[0138] The generation module 840 may use the following method to introduce the target artifact package based on the target instruction to obtain the target icon:
[0139] Based on the first target instruction, the target product package is introduced in full for use to obtain a first target icon set.
[0140] In an exemplary embodiment of the present invention, the target instruction may include a second target instruction, the second target instruction being an instruction for introducing a preset target component in a partial introduction manner, wherein the partial introduction manner is a manner of introducing the preset target component in the target product package according to user requirements, and the preset target component is a target component in the target product package that meets the user requirements; the target icon may include a second target icon set, the second target icon set being a set consisting of icons respectively corresponding to the preset target components;
[0141] The generation module 840 may use the following method to introduce the target artifact package based on the target instruction to obtain the target icon:
[0142] Based on the second target instruction, the preset target component in the target product package is introduced in a partial introduction manner for use to obtain a second target icon set.
[0143] In an exemplary embodiment of the present invention, the generating module 840 may also be configured to:
[0144] Obtaining a style adjustment instruction, wherein the style adjustment instruction is an instruction for adjusting the style of a target icon;
[0145] Based on the style adjustment instruction, determining an adjustment property of a target component corresponding to the style adjustment instruction;
[0146] Based on the adjustment properties of the target component, the target icon is adjusted to obtain an adjusted target icon.
[0147] In an exemplary embodiment of the present invention, the conversion module 820 may convert the icon to be processed into the target component using a preset tool in the following manner:
[0148] Using a preset tool, parsing to obtain the icon attributes to be processed of the icon to be processed;
[0149] Determine the target component attributes corresponding to the icon attributes to be processed based on a mapping table preset by a preset tool, wherein the mapping table includes a mapping relationship between the icon attributes and the component attributes;
[0150] Based on the target component properties, the target component is determined.
[0151] In an exemplary embodiment of the present invention, the acquisition module 810 may determine the icon to be processed in the following manner:
[0152] Get the initial icon;
[0153] In the case that the initial icon meets the preset icon specification, the initial icon is standardized to obtain an icon to be processed, wherein the icon to be processed is an icon with a preset structure.
[0154] Figure 9 An example of a physical structure diagram of an electronic device is shown below. Figure 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute an icon processing method, which includes: obtaining an icon to be processed; converting the icon to be processed into a target component using a preset tool, wherein the target component corresponds to the icon to be processed and has the ability to adjust the style of the icon to be processed; constructing a target product package based on the target component; and obtaining a target icon based on the target product package, wherein the target icon is an icon to be processed with the ability to adjust the style.
[0155] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. 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 and includes several instructions for enabling 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0156] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the icon processing method provided by the above methods, which includes: obtaining the icon to be processed; using a preset tool to convert the icon to be processed into a target component, wherein the target component corresponds to the icon to be processed, and the target component has the ability to adjust the style of the icon to be processed; based on the target component, constructing a target product package; based on the target product package, obtaining a target icon, wherein the target icon is an icon to be processed with style adjustment capability.
[0157] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the icon processing method provided by the above-mentioned methods, the method comprising: obtaining an icon to be processed; using a preset tool to convert the icon to be processed into a target component, wherein the target component corresponds to the icon to be processed, and the target component has the ability to adjust the style of the icon to be processed; based on the target component, constructing a target product package; based on the target product package, obtaining a target icon, wherein the target icon is an icon to be processed with the ability to adjust the style.
[0158] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0159] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0160] It should be further understood that, although operations are described in a particular order in the accompanying drawings in the embodiments of the present invention, this should not be construed as requiring that the operations be performed in the particular order shown or in a serial order, or that all of the operations shown be performed to obtain the desired results. In certain circumstances, multitasking and parallel processing may be advantageous.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An icon processing method, characterized in that: The icon processing method includes: Get pending icons; Using a preset tool to convert the icon to be processed into a target component, wherein the target component corresponds to the icon to be processed and has the ability to adjust the style of the icon to be processed; Building a target artifact package based on the target component; Based on the target product package, a target icon is obtained, wherein the target icon is an icon to be processed with a style adjustment capability, wherein obtaining the target icon based on the target product package specifically includes: Obtaining a target instruction, wherein the target instruction is an instruction for introducing the target product package; Based on the target instruction, the target product package is introduced for use to obtain the target icon, wherein the target instruction includes a first target instruction, which is an instruction for introducing the target product package in a full introduction manner; the target instruction includes a second target instruction, which is an instruction for introducing a preset target component in a partial introduction manner, wherein the partial introduction manner is a manner of introducing a preset target component in the target product package according to user needs, and the preset target component is a target component in the target product package that meets user needs, wherein, after introducing the target product package for use to obtain the target icon, the icon processing method further includes: Obtaining a style adjustment instruction, wherein the style adjustment instruction is an instruction for adjusting the style of the target icon; Based on the style adjustment instruction, determining an adjustment property of the target component corresponding to the style adjustment instruction; Based on the adjustment properties of the target component, the target icon is adjusted to obtain an adjusted target icon.
2. The icon processing method according to claim 1, characterized in that: The target icons include a first target icon set, which is a set consisting of icons corresponding to the target components in the target product package respectively; The step of introducing the target product package based on the target instruction to obtain the target icon specifically includes: Based on the first target instruction, the target product package is introduced in a full-scale introduction manner for use to obtain the first target icon set.
3. The icon processing method according to claim 1, characterized in that: The target icon includes a second target icon set, which is a set consisting of icons corresponding to the preset target components respectively; The step of introducing the target product package based on the target instruction to obtain the target icon specifically includes: Based on the second target instruction, the preset target component in the target product package is introduced in a partial introduction manner for use to obtain the second target icon set.
4. The icon processing method according to claim 1, characterized in that: The converting the icon to be processed into a target component using a preset tool specifically includes: Using the preset tool, parsing to obtain the icon attributes to be processed of the icon to be processed; Determining target component attributes corresponding to the to-be-processed icon attributes based on a mapping table preset by the preset tool, wherein the mapping table includes a mapping relationship between icon attributes and component attributes; The target component is determined based on the target component attribute.
5. The icon processing method according to claim 1, characterized in that: The pending icon is determined in the following manner: Get the initial icon; In the case that the initial icon meets the preset icon specification, the initial icon is standardized to obtain the icon to be processed, wherein the icon to be processed is an icon with a preset structure.
6. An icon processing device, characterized in that: The icon processing device is used to implement the icon processing method according to any one of claims 1 to 5, and the device includes: Acquisition module, used to obtain icons to be processed; a conversion module, configured to convert the icon to be processed into a target component using a preset tool, wherein the target component corresponds to the icon to be processed and has the ability to adjust the style of the icon to be processed; A construction module, configured to construct a target artifact package based on the target component; A generating module is used to obtain a target icon based on the target product package, wherein the target icon is an icon to be processed with a style adjustment capability.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the icon processing method according to any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the icon processing method according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the icon processing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Icon processing method and device, electronic equipment and storage medium
CN114527978A