A product nameplate drawing generation method and device
By automatically parsing and generating nameplate drawings, the problems of low efficiency and error-proneness in manual editing are solved, and efficient and accurate nameplate drawing production is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GREE ELECTRIC APPLIANCE INC OF ZHUHAI
- Filing Date
- 2024-12-18
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, the production of nameplate drawings relies on manual editing, which leads to low efficiency and a high risk of errors.
By acquiring product information and nameplate drawing type, the system automatically parses the controls in the drawing template, generates drawing data based on control operation information, and automatically generates image files.
It improves the efficiency and accuracy of nameplate drawing generation and reduces errors in manual operation.
Smart Images

Figure CN119647442B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of drawing generation technology, and in particular to a method and apparatus for generating product nameplate drawings. Background Technology
[0002] A nameplate is an identification plate primarily used to display important product information. It is usually affixed to the product and includes the manufacturer's trademark, brand differentiation, product specifications, and other information. The nameplate content may include the product name, model number, specifications, production date, manufacturer information, certification marks, etc. This information helps users understand the product's basic performance and parameters. This information is crucial for users to understand the product's performance, specifications, and manufacturer. During product manufacturing and user use, the accuracy of the parameter data on the product nameplate drawings is paramount. Incorrect technical parameters on the nameplate can cause the product to malfunction, or even lead to more serious consequences.
[0003] In the existing technology, the production of nameplate drawings mainly relies on manual compilation. The specific process is as follows: a standardized nameplate template for the product type is opened manually, and the product information is manually filled in on the nameplate template to complete the template editing. Finally, the nameplate drawing is generated from the produced template.
[0004] However, this method of creating nameplate drawings through manual editing is inefficient and prone to errors. Summary of the Invention
[0005] This application provides a method and apparatus for generating product nameplate drawings, which solves the problems of low efficiency and easy error in the existing method of creating nameplate drawings by manual editing.
[0006] Firstly, this application provides a method for generating product nameplate drawings, including:
[0007] Obtain product information of the product to be drawn, and obtain the nameplate drawing type corresponding to the product to be drawn;
[0008] Determine the target template from multiple drawing templates based on the nameplate drawing type;
[0009] The target template is parsed to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed;
[0010] Based on the product information and the control operation information corresponding to each control to be processed, the target template is processed to obtain the drawing data corresponding to the product to be drawn;
[0011] Generate image files corresponding to the product to be drawn based on the drawing data.
[0012] In one possible implementation, parsing the target template to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed includes:
[0013] For each control in the target template, determine the control type of the control;
[0014] Determine the parsing method corresponding to the control based on the control type;
[0015] The control is parsed according to the parsing method described above to determine whether the control is a control to be processed.
[0016] When the control is a control to be processed, the corresponding control operation information is determined according to the control properties of the control to be processed.
[0017] In one possible implementation, the control type includes a text box type, and the step of parsing the control according to the parsing method to determine whether the control is a control to be processed includes:
[0018] Identify the placeholder content corresponding to the control;
[0019] If the placeholder content is preset content, the control is determined to be a control to be processed.
[0020] In one possible implementation, determining the corresponding control operation information based on the control properties of the control to be processed includes:
[0021] When the control property is set to directly fill a placeholder, the corresponding control operation information is determined to be to obtain the first information to be filled corresponding to the control to be processed from the product information, and to fill the first information to be filled into the corresponding filling position.
[0022] When the control attribute is an indirect fill placeholder, the corresponding control operation information is determined to be to obtain the dependent parameter item corresponding to the control to be processed. It is then determined whether to display the dependent parameter item. If the dependent parameter item is displayed, the second information to be filled corresponding to the control to be processed is obtained from the product information, and the second information to be filled is filled into the corresponding fill position. Additionally, the third information to be filled corresponding to the dependent parameter item is obtained, and the third information to be filled is filled into the corresponding fill position. If the dependent parameter item is not displayed, the control to be processed is deleted.
[0023] In one possible implementation, the control type includes non-text box types, and the step of parsing the control according to the parsing method to determine whether the control is a control to be processed includes:
[0024] Identify the parameter attributes corresponding to the control;
[0025] If the parameter attribute is a preset attribute, the control is determined to be a control to be processed.
[0026] In one possible implementation, determining the corresponding control operation information based on the control properties of the control to be processed includes:
[0027] Determine the sub-control types of the control to be processed;
[0028] If the sub-control type is an icon type, obtain the product information corresponding to the product to be output. If the product information contains the control to be processed, determine that the control operation information is to retain the control to be processed. If the product information does not contain the control to be processed, determine that the control operation information is to delete the control to be processed.
[0029] When the sub-control type is an enumeration type, the control operation information is determined to be to obtain all associated controls corresponding to the control to be processed, the control to be processed and all the associated controls are determined as candidate controls, the target control is determined from all the candidate controls according to the product information, the target control is retained, and other candidate controls other than the target control are deleted.
[0030] In one possible implementation, determining the target template from multiple drawing templates based on the nameplate drawing type includes:
[0031] Match at least one candidate template from among the multiple drawing templates according to the nameplate drawing type;
[0032] Receive selection information from at least one of the candidate templates input by the user;
[0033] The candidate template corresponding to the selected information is determined as the target template.
[0034] In one possible implementation, the method further includes:
[0035] A list of template modification parameters is obtained during the process of processing the target template to obtain the drawing data corresponding to the product to be drawn.
[0036] Generate drawing files corresponding to the product to be drawn based on the drawing data;
[0037] The template modification parameter list and the drawing file are sent to the front end for display.
[0038] In one possible implementation, the method further includes:
[0039] During the process of displaying the template modification parameter list and the drawing file on the front end, the modification parameter information input by the user for the drawing file is received;
[0040] Modify the drawing data according to the modified parameter information;
[0041] Generate image files corresponding to the product to be drawn based on the modified drawing data.
[0042] Secondly, this application provides a product nameplate drawing generation device, comprising:
[0043] The acquisition module is used to acquire product information of the product to be drawn, and to acquire the nameplate drawing type corresponding to the product to be drawn;
[0044] The determination module is used to determine the target template from multiple drawing templates based on the nameplate drawing type;
[0045] The parsing module is used to parse the target template to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed.
[0046] The processing module is used to process the target template according to the product information and the control operation information corresponding to each control to be processed to obtain the drawing data corresponding to the product to be drawn;
[0047] The generation module is used to generate image files corresponding to the product to be drawn based on the drawing data.
[0048] In one possible implementation, the parsing module is specifically used for:
[0049] For each control in the target template, determine the control type of the control;
[0050] Determine the parsing method corresponding to the control based on the control type;
[0051] The control is parsed according to the parsing method described above to determine whether the control is a control to be processed.
[0052] When the control is a control to be processed, the corresponding control operation information is determined according to the control properties of the control to be processed.
[0053] In one possible implementation, the control type includes a text box type, and the parsing module is further configured to:
[0054] Identify the placeholder content corresponding to the control;
[0055] If the placeholder content is preset content, the control is determined to be a control to be processed.
[0056] In one possible implementation, the parsing module is further configured to:
[0057] When the control property is set to directly fill a placeholder, the corresponding control operation information is determined to be to obtain the first information to be filled corresponding to the control to be processed from the product information, and to fill the first information to be filled into the corresponding filling position.
[0058] When the control attribute is an indirect fill placeholder, the corresponding control operation information is determined to be to obtain the dependent parameter item corresponding to the control to be processed. It is then determined whether to display the dependent parameter item. If the dependent parameter item is displayed, the second information to be filled corresponding to the control to be processed is obtained from the product information, and the second information to be filled is filled into the corresponding fill position. Additionally, the third information to be filled corresponding to the dependent parameter item is obtained, and the third information to be filled is filled into the corresponding fill position. If the dependent parameter item is not displayed, the control to be processed is deleted.
[0059] In one possible implementation, the control type includes non-text box types, and the parsing module is further configured to:
[0060] Identify the parameter attributes corresponding to the control;
[0061] If the parameter attribute is a preset attribute, the control is determined to be a control to be processed.
[0062] In one possible implementation, the parsing module is further configured to:
[0063] Determine the sub-control types of the control to be processed;
[0064] If the sub-control type is an icon type, obtain the product information corresponding to the product to be output. If the product information contains the control to be processed, determine that the control operation information is to retain the control to be processed. If the product information does not contain the control to be processed, determine that the control operation information is to delete the control to be processed.
[0065] When the sub-control type is an enumeration type, the control operation information is determined to be to obtain all associated controls corresponding to the control to be processed, the control to be processed and all the associated controls are determined as candidate controls, the target control is determined from all the candidate controls according to the product information, the target control is retained, and other candidate controls other than the target control are deleted.
[0066] In one possible implementation, the determining module is specifically used for:
[0067] Match at least one candidate template from among the multiple drawing templates according to the nameplate drawing type;
[0068] Receive selection information from at least one of the candidate templates input by the user;
[0069] The candidate template corresponding to the selected information is determined as the target template.
[0070] In one possible implementation, the device further includes a verification module for:
[0071] A list of template modification parameters is obtained during the process of processing the target template to obtain the drawing data corresponding to the product to be drawn.
[0072] Generate drawing files corresponding to the product to be drawn based on the drawing data;
[0073] The template modification parameter list and the drawing file are sent to the front end for display.
[0074] In one possible implementation, the review module is further configured to:
[0075] During the process of displaying the template modification parameter list and the drawing file on the front end, the modification parameter information input by the user for the drawing file is received;
[0076] Modify the drawing data according to the modified parameter information;
[0077] Generate image files corresponding to the product to be drawn based on the modified drawing data.
[0078] Thirdly, this application provides an apparatus comprising: a processor and a memory, the processor being configured to execute a product nameplate drawing generation program stored in the memory to implement the product nameplate drawing generation method described in any one of the first aspects.
[0079] Fourthly, this application provides a storage medium storing one or more programs that can be executed by one or more processors to implement the product nameplate drawing generation method described in any one aspect.
[0080] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application first obtains product information of the product to be drawn and the nameplate drawing type corresponding to the product to be drawn. Then, based on the nameplate drawing type, a target template is determined from multiple drawing templates, and the target template is parsed to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed. Finally, based on the product information and the control operation information corresponding to each control to be processed, the target template is processed to obtain drawing data corresponding to the product to be drawn, and an image file corresponding to the product to be drawn is generated based on the drawing data. Through this application, intelligent parsing of the drawing template corresponding to the product to be drawn can be realized. Furthermore, based on the product information of the product to be drawn and the parsing result of the drawing template, an image file of the product to be drawn can be automatically generated, thereby improving the efficiency and accuracy of product nameplate drawing generation. Attached Figure Description
[0081] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0082] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0083] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0084] Figure 1 A flowchart illustrating an embodiment of a method for generating product nameplate drawings provided in this application;
[0085] Figure 2 An example of a drawing template provided in this application embodiment;
[0086] Figure 3 Another example of a drawing template provided for embodiments of this application;
[0087] Figure 4 Another example of a drawing template provided for embodiments of this application;
[0088] Figure 5A flowchart illustrating an embodiment of another method for generating product nameplate drawings provided in this application;
[0089] Figure 6 A block diagram illustrating an embodiment of a product nameplate drawing generation device provided in this application;
[0090] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0091] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0092] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0093] To address the inefficiency and error-prone nature of existing methods for creating nameplate drawings through manual editing, this application provides a method for generating product nameplate drawings. This method intelligently parses the drawing template corresponding to the product to be drawn, and then automatically generates an image file of the product to be drawn based on the product information and the parsing results of the drawing template. This improves the efficiency and accuracy of product nameplate drawing generation.
[0094] Figure 1 This is a flowchart illustrating an embodiment of a method for generating product nameplate drawings provided in this application. Figure 1 As shown, the method includes the following steps:
[0095] Step 101: Obtain product information of the product to be drawn, and obtain the nameplate drawing type corresponding to the product to be drawn.
[0096] Step 102: Determine the target template from multiple drawing templates according to the nameplate drawing type.
[0097] For ease of understanding, steps 101-102 will be explained uniformly below:
[0098] Product information is used to represent parameter attribute names, parameter values, and the corresponding units of parameter values. For example, information such as product name, model, energy efficiency rating, and rated power.
[0099] In one embodiment, the user issues a drawing output command carrying a unique product identifier (such as a product code, which is a unique identifier for the product name). In response to the user's drawing output command, the system retrieves the product information corresponding to the unique product identifier.
[0100] In practical applications, if the product's unique identifier cannot be found, the user can be prompted that "the product parameter does not exist".
[0101] Nameplate drawing type refers to the type of drawing the user requests, such as nameplate drawings, energy efficiency labels, model markings, etc. Each drawing type may contain different content; for example, nameplate drawings may contain product barcodes, and energy efficiency labels may contain QR codes.
[0102] In the application, the drawing output command also carries the nameplate drawing type that the user wants to output. Each drawing type corresponds to multiple drawing templates. For example, drawing templates for the nameplate drawing type include: drawing templates for duct air conditioners, drawing templates for ceiling air conditioners, etc.
[0103] Based on this, in one embodiment, the specific implementation of determining the target template from multiple drawing templates according to the nameplate drawing type may include the following steps:
[0104] Based on the nameplate drawing type, at least one corresponding candidate template is matched among multiple drawing templates, selection information input by the user for at least one candidate template is received, and the candidate template corresponding to the selection information is determined as the target template.
[0105] In this embodiment, the system can first determine multiple candidate templates based on the nameplate drawing type carried by the drawing instruction. Then, it displays these candidate templates through a visualization component, awaiting further selection by the user. After the user inputs their selection information, the candidate template corresponding to that selection is determined as the target template. In this way, the user can flexibly select a template according to their actual needs.
[0106] In practical applications, if a template for the nameplate drawing type does not exist, the user can be prompted that "the drawing template does not exist," thus prompting the user to provide a replacement template.
[0107] Step 103: Parse the target template to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed.
[0108] Step 104: Based on the product information and the control operation information corresponding to each control to be processed, process the target template to obtain the drawing data corresponding to the product to be drawn.
[0109] Step 105: Generate the image file corresponding to the product to be drawn based on the drawing data.
[0110] For ease of understanding, steps 103-105 will be explained uniformly below:
[0111] In the application, each drawing template contains multiple controls. Each control has a value (i.e., the content to be displayed by the control) and an attribute (i.e., the name of the content to be displayed by the control, such as product type, product parameters, and parameter units). The control operation information, i.e., the editing method corresponding to the control, can be determined through the value and attribute. These controls are predefined using parameter data tags, which facilitates the subsequent parsing of the template using a tag-based parser that encapsulates the filling method based on known parameters.
[0112] Based on this, step 103 may include the following steps:
[0113] Step A1: For each control in the target template, determine the control type of the control;
[0114] Step A2: Determine the parsing method corresponding to the control based on the control type;
[0115] Step A3: Parse the control according to the parsing method to determine whether the control is a control to be processed;
[0116] Step A4: If the control is a control to be processed, determine the corresponding control operation information based on the control properties of the control to be processed.
[0117] The control types mentioned above include text box types and non-text box types. Non-text box types include icon types and enumeration types. Enumeration types refer to controls where there are contradictory relationships between data of the same type of attributes. For example, energy efficiency levels include level 1, level 2, level 3, level 4, and level 5. Only one level is retained according to the actual situation.
[0118] Figure 2 and Figure 3 The image shown is an example of a drawing template, such as... Figure 2 As shown, the content enclosed in "[]" is a text box control. These controls use "[]" to define the range of data labels and ":" to delimit attributes. For example, [I: Rated Current: A] represents the data label as the rated current of the indoor air conditioner unit in A; [O: Net Weight: kg] represents the net weight parameter of the outdoor unit in kg. Figure 3 As shown, the recycling logo, energy-saving certification logo, and 3C certification logo are icon-type controls.
[0119] In one specific implementation, for a text box type of control, parsing the control according to the parsing method to determine whether the control is a control to be processed may include the following steps: identifying the placeholder content corresponding to the control, and determining the control as a control to be processed if the placeholder content is preset content.
[0120] In this implementation, it is determined whether the text box content (i.e., the control value content) contains preset content that conforms to the placeholder format (i.e., "[]") to determine whether it is a control to be processed. If "[]" exists, it means that the control is a control to be processed.
[0121] Accordingly, the specific implementation of determining the corresponding control operation information based on the control properties of the control to be processed may include the following steps:
[0122] When the control attribute is a direct fill placeholder, the corresponding control operation information is determined to be: obtaining the first fill information corresponding to the control to be processed from the product information, and filling the first fill information into the corresponding fill position. When the control attribute is an indirect fill placeholder, the corresponding control operation information is determined to be: obtaining the dependent parameter item corresponding to the control to be processed, determining whether to display the dependent parameter item, and if the dependent parameter item is displayed, obtaining the second fill information corresponding to the control to be processed from the product information, filling the second fill information into the corresponding fill position, and obtaining the third fill information corresponding to the dependent parameter item, filling the third fill information into the corresponding fill position. If the dependent parameter item is not displayed, deleting the control to be processed.
[0123] In this implementation, if the control property of the placeholder is to directly fill and replace the placeholder, the corresponding parameter value is directly matched in the product information and the matched value is filled in. If the control property is to indirectly fill the placeholder, the prerequisite judgment of its dependent parameters is checked. For example, if the placeholder is: connecting pipe specification: φ[air pipe diameter: -:mm] / φ[liquid pipe diameter: -:mm], the air pipe diameter and liquid pipe diameter are defined as indirect placeholders. Whether to display them here depends on whether the connecting pipe specification is displayed in the finished product code table. If its dependent parameter item is not displayed, the placeholder data is deleted. If its dependent parameter item is displayed, the value of the specific parameter is queried from the product information to replace the placeholder content.
[0124] It should be noted that if a value in the product information is inconsistent with the unit of the corresponding control, the unit needs to be converted so that the data displayed on the drawing meets the template unit requirements.
[0125] In another specific implementation, for non-text box type controls, parsing the control according to the parsing method to determine whether the control is a control to be processed may include the following steps: identifying the parameter attribute corresponding to the control, and determining the control as a control to be processed if the parameter attribute is a preset attribute.
[0126] In this implementation, it is determined whether a non-text box content (i.e., control attribute content) is a preset attribute to determine whether it is a control to be processed. If it is a preset attribute, it means that the control is a control to be processed. The preset attribute can be set by the user in advance.
[0127] Accordingly, the specific implementation of determining the corresponding control operation information based on the control properties of the control to be processed may include the following steps:
[0128] The process involves determining the sub-control type of the control to be processed. If the sub-control type is an icon, the process obtains the product information corresponding to the product to be displayed. If the product information includes the control to be processed, the process determines the control operation information to retain the control to be processed. If the product information does not include the control to be processed, the process determines the control operation information to delete the control to be processed. If the sub-control type is an enumeration type, the process determines the control operation information to obtain all associated controls corresponding to the control to be processed. The process identifies the control to be processed and all associated controls as candidate controls. Based on the product information, the process identifies the target control among all candidate controls, retains the target control, and deletes other candidate controls besides the target control.
[0129] For example, for the "recycling icon" of the icon type, query the finished product database of the product information to see if the "recycling icon" needs to be displayed. If it is needed, keep the control; otherwise, delete the control.
[0130] For example, for the enumerated type of "energy efficiency label", such as Figure 4 As shown, the "energy efficiency label" includes levels 1, 2, 3, 4 and 5. If the product information shows that the energy efficiency of the product is level 1, then only the control for the level 1 energy efficiency label will be retained, and the controls for other energy efficiency labels will be deleted.
[0131] After determining the controls to be processed and their corresponding operation information using the above method, for each control to be processed, the corresponding information can be obtained from the product information according to its corresponding operation information for processing. This yields drawing data, which is then used to generate image files corresponding to the product to be drawn. These image files are then returned to the front end for users to view and preview. The format of the image files can be set by the user according to their actual needs, such as JPG or PNG.
[0132] The technical solution provided in this application first obtains product information of the product to be drawn and the nameplate drawing type corresponding to the product to be drawn. Then, based on the nameplate drawing type, a target template is determined from multiple drawing templates, and the target template is parsed to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed. Finally, based on the product information and the control operation information corresponding to each control to be processed, the target template is processed to obtain drawing data corresponding to the product to be drawn, and an image file corresponding to the product to be drawn is generated based on the drawing data. Through this application, intelligent parsing of the drawing template corresponding to the product to be drawn can be realized, and then, based on the product information of the product to be drawn and the parsing result of the drawing template, the image file of the product to be drawn can be automatically generated, thereby improving the efficiency and accuracy of product nameplate drawing generation.
[0133] Figure 5 A flowchart illustrating an embodiment of another method for generating product nameplate drawings provided in this application. Figure 5 The process shown is in Figure 1 Based on the illustrated process, the following steps are included:
[0134] Step 501: Obtain the template modification parameter list during the process of processing the target template to obtain the drawing data corresponding to the product to be drawn;
[0135] Step 502: Generate the drawing file corresponding to the product to be drawn based on the drawing data;
[0136] Step 503: Send the template modification parameter list and the drawing file to the front end for display.
[0137] For ease of understanding, steps 501-503 will be explained uniformly below:
[0138] The template modification parameter list refers to the list of parameters involved in processing each control to be processed in the target template.
[0139] Drawing files, including but not limited to cdr (CorelDRAW) and dwg (Drawing) files.
[0140] In this embodiment, drawing files can be generated simultaneously with image files. By returning the drawing files and template modification parameter list to the front end for display, users can easily view the generated drawings on the front end and clearly understand the specific product parameters associated with the drawings, thus enabling the verification and validation of the drawing data.
[0141] Furthermore, in yet another embodiment of this application, the method may further include the following steps:
[0142] During the process of displaying the template modification parameter list and the drawing file on the front end, the system receives modification parameter information input by the user for the drawing file, modifies the drawing data according to the modification parameter information, and generates an image file corresponding to the product to be drawn based on the modified drawing data.
[0143] In this embodiment, after previewing the drawing, if the user needs to modify the drawing content, they can modify the template parameter list on the front end and submit the modified parameters back to the system backend. The system backend will then redraw the drawing based on the parameter information returned by the front end and complete the data verification. This enables online modification of the drawing content and improves the accuracy of drawing generation.
[0144] Figure 6 This is a block diagram illustrating an embodiment of a product nameplate drawing generation device provided in this application. Figure 6 As shown, the device includes:
[0145] The acquisition module 61 is used to acquire product information of the product to be drawn, and to acquire the nameplate drawing type corresponding to the product to be drawn;
[0146] The determination module 62 is used to determine the target template from multiple drawing templates according to the nameplate drawing type;
[0147] The parsing module 63 is used to parse the target template to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed.
[0148] Processing module 64 is used to process the target template according to the product information and the control operation information corresponding to each control to be processed to obtain the drawing data corresponding to the product to be drawn;
[0149] The generation module 65 is used to generate image files corresponding to the product to be drawn based on the drawing data.
[0150] In one possible implementation, the parsing module is specifically used for:
[0151] For each control in the target template, determine the control type of the control;
[0152] Determine the parsing method corresponding to the control based on the control type;
[0153] The control is parsed according to the parsing method described above to determine whether the control is a control to be processed.
[0154] When the control is a control to be processed, the corresponding control operation information is determined according to the control properties of the control to be processed.
[0155] In one possible implementation, the control type includes a text box type, and the parsing module is further configured to:
[0156] Identify the placeholder content corresponding to the control;
[0157] If the placeholder content is preset content, the control is determined to be a control to be processed.
[0158] In one possible implementation, the parsing module is further configured to:
[0159] When the control property is set to directly fill a placeholder, the corresponding control operation information is determined to be to obtain the first information to be filled corresponding to the control to be processed from the product information, and to fill the first information to be filled into the corresponding filling position.
[0160] When the control attribute is an indirect fill placeholder, the corresponding control operation information is determined to be to obtain the dependent parameter item corresponding to the control to be processed. It is then determined whether to display the dependent parameter item. If the dependent parameter item is displayed, the second information to be filled corresponding to the control to be processed is obtained from the product information, and the second information to be filled is filled into the corresponding fill position. Additionally, the third information to be filled corresponding to the dependent parameter item is obtained, and the third information to be filled is filled into the corresponding fill position. If the dependent parameter item is not displayed, the control to be processed is deleted.
[0161] In one possible implementation, the control type includes non-text box types, and the parsing module is further configured to:
[0162] Identify the parameter attributes corresponding to the control;
[0163] If the parameter attribute is a preset attribute, the control is determined to be a control to be processed.
[0164] In one possible implementation, the parsing module is further configured to:
[0165] Determine the sub-control types of the control to be processed;
[0166] If the sub-control type is an icon type, obtain the product information corresponding to the product to be output. If the product information contains the control to be processed, determine that the control operation information is to retain the control to be processed. If the product information does not contain the control to be processed, determine that the control operation information is to delete the control to be processed.
[0167] When the sub-control type is an enumeration type, the control operation information is determined to be to obtain all associated controls corresponding to the control to be processed, the control to be processed and all the associated controls are determined as candidate controls, the target control is determined from all the candidate controls according to the product information, the target control is retained, and other candidate controls other than the target control are deleted.
[0168] In one possible implementation, the determining module is specifically used for:
[0169] Match at least one candidate template from among the multiple drawing templates according to the nameplate drawing type;
[0170] Receive selection information from at least one of the candidate templates input by the user;
[0171] The candidate template corresponding to the selected information is determined as the target template.
[0172] In one possible implementation, the device further includes a verification module for:
[0173] A list of template modification parameters is obtained during the process of processing the target template to obtain the drawing data corresponding to the product to be drawn.
[0174] Generate drawing files corresponding to the product to be drawn based on the drawing data;
[0175] The template modification parameter list and the drawing file are sent to the front end for display.
[0176] In one possible implementation, the review module is further configured to:
[0177] During the process of displaying the template modification parameter list and the drawing file on the front end, the modification parameter information input by the user for the drawing file is received;
[0178] Modify the drawing data according to the modified parameter information;
[0179] Generate image files corresponding to the product to be drawn based on the modified drawing data.
[0180] like Figure 7As shown in the figure, this application provides a device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0181] Memory 113 is used to store computer programs;
[0182] In one embodiment of this application, when the processor 111 executes the program stored in the memory 113, it implements the product nameplate drawing generation method provided in any of the foregoing method embodiments, including:
[0183] Obtain product information of the product to be drawn, and obtain the nameplate drawing type corresponding to the product to be drawn;
[0184] Determine the target template from multiple drawing templates based on the nameplate drawing type;
[0185] The target template is parsed to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed;
[0186] Based on the product information and the control operation information corresponding to each control to be processed, the target template is processed to obtain the drawing data corresponding to the product to be drawn;
[0187] Generate image files corresponding to the product to be drawn based on the drawing data.
[0188] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the product nameplate drawing generation method provided in any of the foregoing method embodiments.
[0189] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0190] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0191] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0192] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for generating product nameplate drawings, characterized in that, The method includes: Obtain product information of the product to be drawn, and obtain the nameplate drawing type corresponding to the product to be drawn; Based on the nameplate drawing type, a target template is determined from multiple drawing templates, wherein the controls in the target template are defined through parameter data labels; The target template is parsed to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed; Based on the product information and the control operation information corresponding to each control to be processed, the target template is processed to obtain the drawing data corresponding to the product to be drawn. The processing includes: dynamically retaining or deleting controls in the target template according to the rules defined by the product information and the control operation information, so as to change the structure of the target template. Generate image files corresponding to the product to be drawn based on the drawing data; The step of parsing the target template to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed includes: For each control in the target template, determine the control type of the control; Determine the parsing method corresponding to the control based on the control type; The control is parsed according to the parsing method described above to determine whether the control is a control to be processed. When the control is a control to be processed, the corresponding control operation information is determined according to the control properties of the control to be processed; The control types include text box types and non-text box types; For text box type controls, the step of parsing the control according to the parsing method to determine whether the control is a control to be processed includes: identifying the placeholder content corresponding to the control; and determining that the control is a control to be processed if the placeholder content is preset content. The step of determining the corresponding control operation information based on the control properties of the control to be processed includes: When the control property is set to directly fill a placeholder, the corresponding control operation information is determined to be to obtain the first information to be filled corresponding to the control to be processed from the product information, and to fill the first information to be filled into the corresponding filling position. When the control attribute is an indirect fill placeholder, the corresponding control operation information is determined to be to obtain the dependent parameter item corresponding to the control to be processed, and it is determined whether to display the dependent parameter item. If the dependent parameter item is displayed, the second information to be filled corresponding to the control to be processed is obtained from the product information, and the second information to be filled is filled into the corresponding fill position. Also, the third information to be filled corresponding to the dependent parameter item is obtained, and the third information to be filled is filled into the corresponding fill position. If the dependent parameter item is not displayed, the control to be processed is deleted. For controls that are not text boxes, determining the corresponding control operation information based on the control properties of the control to be processed includes: Determine the sub-control types of the control to be processed; If the sub-control type is an icon type, obtain the product information corresponding to the product to be output. If the product information contains the control to be processed, determine that the control operation information is to retain the control to be processed. If the product information does not contain the control to be processed, determine that the control operation information is to delete the control to be processed. When the sub-control type is an enumeration type, the control operation information is determined to be to obtain all associated controls corresponding to the control to be processed, the control to be processed and all the associated controls are determined as candidate controls, the target control is determined from all the candidate controls according to the product information, the target control is retained, and other candidate controls other than the target control are deleted.
2. The method of claim 1, wherein, The control type includes non-text box types. The step of parsing the control according to the parsing method to determine whether the control is a control to be processed includes: Identify the parameter attributes corresponding to the control; If the parameter attribute is a preset attribute, the control is determined to be a control to be processed.
3. The method of claim 1, wherein, The step of determining the target template from multiple drawing templates based on the nameplate drawing type includes: Match at least one candidate template from among the multiple drawing templates according to the nameplate drawing type; Receive selection information from at least one of the candidate templates input by the user; The candidate template corresponding to the selected information is determined as the target template.
4. The method of claim 1, wherein, The method further includes: A list of template modification parameters is obtained during the process of processing the target template to obtain the drawing data corresponding to the product to be drawn. Generate drawing files corresponding to the product to be drawn based on the drawing data; The template modification parameter list and the drawing file are sent to the front end for display.
5. The method of claim 4, wherein, The method further includes: During the process of displaying the template modification parameter list and the drawing file on the front end, the system receives modification parameter information input by the user for the drawing file. Modify the drawing data according to the modified parameter information; Generate image files corresponding to the product to be drawn based on the modified drawing data.
6. A product nameplate drawing generation apparatus characterized by comprising: The device includes: The acquisition module is used to acquire product information of the product to be drawn, and to acquire the nameplate drawing type corresponding to the product to be drawn; The determination module is used to determine a target template from multiple drawing templates based on the nameplate drawing type, wherein the controls in the target template are defined through parameter data labels; The parsing module is used to parse the target template to obtain at least one control to be processed contained in the target template and control operation information corresponding to each control to be processed. The processing module is used to process the target template according to the product information and the control operation information corresponding to each control to be processed to obtain the drawing data corresponding to the product to be drawn. The processing includes: dynamically retaining or deleting controls in the target template according to the rules defined by the product information and the control operation information to change the structure of the target template. The generation module is used to generate image files corresponding to the product to be drawn based on the drawing data; Specifically, the parsing module is used for: For each control in the target template, determine the control type of the control; Determine the parsing method corresponding to the control based on the control type; The control is parsed according to the parsing method described above to determine whether the control is a control to be processed. When the control is a control to be processed, the corresponding control operation information is determined according to the control properties of the control to be processed; The control types include text box types and non-text box types; For text box type controls, the parsing module is further configured to: identify the placeholder content corresponding to the control; and determine the control as a control to be processed if the placeholder content is preset content. When the control property is set to directly fill a placeholder, the corresponding control operation information is determined to be to obtain the first information to be filled corresponding to the control to be processed from the product information, and to fill the first information to be filled into the corresponding filling position. When the control attribute is an indirect fill placeholder, the corresponding control operation information is determined to be to obtain the dependent parameter item corresponding to the control to be processed, and it is determined whether to display the dependent parameter item. If the dependent parameter item is displayed, the second information to be filled corresponding to the control to be processed is obtained from the product information, and the second information to be filled is filled into the corresponding fill position. Also, the third information to be filled corresponding to the dependent parameter item is obtained, and the third information to be filled is filled into the corresponding fill position. If the dependent parameter item is not displayed, the control to be processed is deleted. For controls that are not text boxes, determine the sub-control types of the control to be processed; If the sub-control type is an icon type, obtain the product information corresponding to the product to be output. If the product information contains the control to be processed, determine that the control operation information is to retain the control to be processed. If the product information does not contain the control to be processed, determine that the control operation information is to delete the control to be processed. When the sub-control type is an enumeration type, the control operation information is determined to be to obtain all associated controls corresponding to the control to be processed, the control to be processed and all the associated controls are determined as candidate controls, the target control is determined from all the candidate controls according to the product information, the target control is retained, and other candidate controls other than the target control are deleted.