Method, apparatus, computer device and storage medium for renaming pads
By receiving and inspecting pad data, renaming and generating storage tables if the naming rules are not met, the problem of inconsistent pad naming is solved, and effective management and efficient design of pad data are achieved.
Patent Information
- Application Number
- CN201911274949.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-12
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2039-12-12
AI Technical Summary
Inconsistent pad naming, resulting in difficulty in data management and maintenance, and it is easy to repeatedly create the same pad data.
By receiving pad data, check whether it complies with preset naming rules. If it does not comply, call the standard name template according to the pad type for renaming, and generate a pad storage table to store it in the standard package library.
It realizes the unification of pad naming, facilitates management, reduces duplicate work, and improves design accuracy and work efficiency.
Smart Images

Figure CN112966464B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of PCB board design, and particularly to a method, device, computer device and storage medium for renaming pads. Background Art
[0002] A pad, the basic component unit of surface mount assembly, is used to form the pad pattern (LandPattern) of the circuit board, that is, various pad combinations designed for special component types.
[0003] During the design process of pads, different designers have their own habitual ways of naming pads, resulting in inconsistent pad naming, making it difficult to manage and maintain pad data, and subsequent personnel are prone to repeating the same pad data. Summary of the Invention
[0004] The purpose of the embodiments of this application is to propose a method for renaming pads, avoiding production problems caused by non-standard pad naming, and efficiently processing and querying pad data.
[0005] To solve the above technical problems, the embodiments of this application provide a method for renaming pads, adopting the following technical solutions:
[0006] A method for renaming pads includes the following steps:
[0007] Receiving pad data, where the pad data includes a pad name and a pad type;
[0008] Checking whether the pad name fully complies with a preset naming rule;
[0009] If not, calling a preset standard name template according to the pad type, and renaming all pad names that do not comply with the naming rule through the standard name template;
[0010] Generating a pad storage table based on all current pad data, and storing the pad storage table in a standard package library.
[0011] To solve the above technical problems, the embodiments of this application also provide a device for renaming pads, adopting the following technical solutions:
[0012] A device for renaming pads includes:
[0013] A receiving module, configured to receive pad data, where the pad data includes a pad name and a pad type;
[0014] An inspection module, configured to check whether the pad name fully complies with a preset naming rule;
[0015] A naming module, which is used to call a preset standard name template according to the pad type when the pad name does not conform to the naming rule, and rename all pad names that do not conform to the naming rule through the standard name template; and
[0016] A storage module, which is used to generate a pad storage table according to all current pad data and store the pad storage table in the standard package library.
[0017] To solve the above technical problems, an embodiment of the present application also provides a computer device, which adopts the following technical solutions:
[0018] A computer device includes a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps of the above method for renaming pads are implemented.
[0019] To solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which adopts the following technical solutions:
[0020] A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method for renaming pads are implemented.
[0021] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
[0022] In the present application, pads that do not conform to the naming rule are determined by checking the pad names, and the pads are renamed according to a unified naming rule, so that the naming of all pads conforms to the unified rule, which is convenient for the management of pads and better maintenance of the package by subsequent personnel; it reduces the repetitive work of creating new pads and improves work efficiency; it improves the accuracy of design and reduces unnecessary production risks, resource waste and economic losses. Description of the Drawings
[0023] To more clearly illustrate the solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application. Obviously, the following drawings are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
[0024] Figure 1 It is an exemplary system architecture diagram to which the present application can be applied;
[0025] Figure 2 A flowchart of an embodiment of a method for renaming pads according to the present application;
[0026] Figure 3 isFigure 2 Flow chart of a specific implementation of step S2 in
[0027] Figure 4 Schematic structural diagram of an embodiment of a device for renaming pads according to the present application;
[0028] Figure 5 Schematic structural diagram of an embodiment of a computer device according to the present application.
[0029] Reference numerals: 200, computer device; 201, memory; 202, processor; 203, network interface; 300, device for renaming pads; 301, receiving module; 302, checking module; 303, naming module; 304, storage module. Specific implementation
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of this application or the above drawings are used to distinguish different objects and not to describe a specific order.
[0031] Reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0032] To enable those skilled in the art of this technology to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0033] As Figure 1 shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0034] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0035] Terminal devices 101, 102, and 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop portable computers, desktop computers, and so on.
[0036] Server 105 can be a server providing various services, such as a background server that provides support for the pages displayed on terminal devices 101, 102, and 103.
[0037] It should be noted that the method for renaming pads provided in the embodiments of the present application is generally executed by the server / terminal device. Correspondingly, the device for renaming pads is generally set in the server / terminal device.
[0038] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in
[0039] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. Figure 2 Continuing to refer to
[0040] S1: Receive pad data, where the pad data includes a pad name and a pad type.
[0041] In this embodiment, the pad data comes from a design file, which is sent by the developer. In most cases, the naming rule of its pad name is different from the pad name naming rule set by the company. Receiving the pad data is to perform subsequent processing on the pad data.
[0042] In this embodiment, the electronic device on which the method for renaming pads runs (such as Figure 1The server / terminal device shown can receive pad data through a wired connection or a wireless connection. It should be noted that the above wireless connection methods can include, but are not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future-developed wireless connection methods.
[0043] S2: Check whether all the pad names conform to a preset naming rule.
[0044] In this embodiment, if all the pad names conform to the preset naming rule, the pad data can be directly stored in the standard package library. By checking the pad names, the pad names that do not conform to the preset naming rule are screened out, avoiding incorrect pad names from being mixed into the standard package library, which may prevent personnel from timely determining which type of pad design has been completed, resulting in repeated pad design and repeated new pad creation work.
[0045] The pad data also includes pad size and pad shape; in step S2, that is, the step of checking whether all the pad names conform to the preset naming rule includes:
[0046] S21: Identify the pad type, pad size, and pad shape corresponding to the pad name.
[0047] S22: Detect the string corresponding to the pad name according to the pad type. If the detected string is consistent with the pad type, then detect the data type of the string corresponding to the pad name according to the pad size.
[0048] S23: If the data type of the detected string is numeric, then detect the string corresponding to the pad name according to the pad shape.
[0049] S24: If the string is consistent with the pad shape, then determine that the pad name conforms to the preset naming rule.
[0050] In this embodiment, a detailed check is performed on the pad names to avoid misdetection and missed detection.
[0051] Specifically, in step S22, that is, the step of detecting the string corresponding to the pad name according to the pad type includes:
[0052] If the identified pad type is SMD (Surface Mounted Devices) type, then detect whether the 4th, 8th, and 12th characters of the pad name are respectively the first fixed character, the second fixed character, and the third fixed character stored in advance.
[0053] If so, using the first fixed character as a delimiter, preliminarily split the pad name to obtain a first main string and a second main string, and confirm whether the first main string is SMD.
[0054] If the first main string is SMD, using the second fixed character as a delimiter, split the second main string to obtain a first sub-string and a second sub-string.
[0055] Using the third fixed character as a delimiter, split the first sub-string to obtain a first secondary sub-string and a second secondary sub-string.
[0056] In step S23, that is, the step of, if the data type of the detected string is numeric, detecting the string corresponding to the pad name according to the pad shape includes:
[0057] Identify the data types of the first secondary sub-string and the second secondary sub-string.
[0058] If the first secondary sub-string and the second secondary sub-string are numeric, confirm whether the second sub-string is RE or CI or OB.
[0059] The step of, if the string is consistent with the pad shape, determining that the pad name conforms to the preset naming rule is:
[0060] If the second sub-string is RE or CI or OB, it is considered that the pad name conforms to the naming rule.
[0061] Wherein, the first main string and the second main string are all the characters in the pad name before the first fixed character and after the second fixed character respectively; the first sub-string and the second sub-string are all the characters in the sub-string before the second fixed character and after the second fixed character respectively; the first secondary sub-string and the second secondary sub-string are all the characters in the first sub-string before the third fixed character and after the third fixed character respectively.
[0062] In step S21, that is, the step of identifying the pad type, pad size, and pad shape corresponding to the pad name, further includes:
[0063] If the identified pad type is DIP (broken hole pad) type, identify the plating attribute, pad size, pad shape, drilling size, and drilling shape corresponding to the pad name.
[0064] In step S22, that is, the step of detecting the string corresponding to the pad name according to the pad type includes:
[0065] If the electroplating attribute is PTH (Plated Through Hole Pad), check whether the 4th, 8th, 12th, 15th, 19th, and 23rd characters of the pad name are respectively the pre-stored fourth fixed character, fifth fixed character, sixth fixed character, seventh fixed character, eighth fixed character, and ninth fixed character;
[0066] If the electroplating attribute is NPTH (Non-Plated Through Hole Pad), check whether the 5th, 9th, 13th, 16th, 20th, and 24th characters of the pad name are respectively the pre-stored fourth fixed character, fifth fixed character, sixth fixed character, seventh fixed character, eighth fixed character, and ninth fixed character;
[0067] If so, using the fourth fixed character and the seventh fixed character as the delimiters, perform a preliminary split on the pad name to obtain the third main string, fourth main string, and fifth main string, and confirm whether the third main string is PTH or NPTH.
[0068] If the third main string is PTH or NPTH, use the sixth fixed character to split the fourth main string to obtain a third sub-string and a fourth sub-string;
[0069] Using the ninth fixed character as the delimiter, split the fifth main string to obtain a fifth sub-string and a sixth sub-string;
[0070] Using the fifth fixed character as the delimiter, split the third sub-string to obtain a third secondary sub-string and a fourth secondary sub-string;
[0071] Using the eighth fixed character as the delimiter, split the fifth sub-string to obtain a fifth secondary sub-string and a sixth secondary sub-string;
[0072] In step S23, that is, the step of, if the data type of the detected string is numeric, checking the string corresponding to the pad name according to the pad shape includes:
[0073] Identify the data types of the third secondary sub-string, fourth secondary sub-string, fifth secondary sub-string, and sixth secondary sub-string;
[0074] If the third secondary sub-string, fourth secondary sub-string, fifth secondary sub-string, and sixth secondary sub-string are numeric, confirm whether the fourth sub-string and the sixth sub-string are RE or CI or OB;
[0075] Step S24, that is, the step of, if the string is consistent with the pad shape, determining that the pad name conforms to the preset naming rule is:
[0076] If the fourth secondary string and the sixth secondary string are RE or CI or OB, it is considered that the pad name conforms to the naming rule;
[0077] Among them, the third main string and the fifth main string are all the characters in the pad name before the fourth fixed character and after the seventh fixed character respectively; the fourth string is all the characters in the pad name between the fourth fixed character and the seventh fixed character; the third secondary string and the fourth secondary string are all the characters in the fourth main string before the sixth fixed character and after the sixth fixed character respectively; the fifth secondary string and the sixth secondary string are all the characters in the fifth main string before the ninth fixed character and after the ninth fixed character respectively; the third sub-secondary string and the fourth sub-secondary string are all the characters in the third secondary string before the fifth fixed character and after the fifth fixed character respectively; the fifth sub-secondary string and the sixth sub-secondary string are all the characters in the fifth secondary string before the eighth fixed character and after the eighth fixed character respectively.
[0078] In this embodiment, if any conclusion in the above process is negative, it is considered that the pad name does not conform to the preset naming rule, that is, it does not conform to the naming standard of the company's pads. Identify the pad type corresponding to each line according to the pad name. The first fixed character is "_", the second fixed character is "X", and the third fixed character is "-". Among them, RE represents a rectangle (including a rectangle and a square), CI represents a circle, and OB represents an ellipse. The fourth fixed character and the seventh fixed character are "_", the fifth fixed character and the eighth fixed character are "X", and the sixth fixed character and the ninth fixed character are "-". Conduct a detailed inspection of the pad name. First, determine whether the characters at the fixed positions are the preset characters. Secondly, split the pad name to determine whether each split string conforms to the preset naming rule, so as to achieve an accurate and detailed inspection of the pad name and avoid the occurrence of omission or mis-inspection.
[0079] S3: If not, then call the preset standard name template according to the pad type, and rename all the pad names that do not conform to the naming rule through the standard name template.
[0080] In this embodiment, the pad type is preferentially identified, and the corresponding standard name template is called according to the pad type, so as to ensure that the pad name can be quickly and accurately renamed through the standard name template.
[0081] In the step of renaming the pad names that do not conform to the naming rule through the standard name template, it includes:
[0082] Split the pad data into first pad data and second pad data, where the first pad data includes pad names that conform to the naming rule, and pad types, pad shapes, and pad sizes that have a one-to-one correspondence with the pad names; the second pad data includes pad names that do not conform to the naming rule, and pad types, pad shapes, and pad sizes that have a one-to-one correspondence with the pad names;
[0083] Generate a second pad data table according to the second pad data;
[0084] Perform the following renaming operations on each of the pad names in the second pad data table in sequence: Identify the current row data in the second pad data table and record it in a corresponding variable created in advance;
[0085] Extract the pad data from the variable and perform preprocessing, and rename the pad name of the current row according to the rules of the standard name template based on the preprocessed pad data.
[0086] In this embodiment, the preprocessing includes converting the data of the proposed pad size into a numerical type, rounding it, and taking the first three digits as the pad size; generating two pad data tables from the pad data, namely the first pad data table and the second pad data table, and only performing a loop check and renaming on the second pad data table one by one to reduce the amount of data to be processed and improve the processing speed of the system.
[0087] Specifically, the pad data further includes pad shape, plating attribute, pad size, drilling size, and drilling shape. The pad size includes a first width and a first length, and the drilling size includes a second width and a second length;
[0088] In the step of identifying the current row data in the second pad data table and recording it in a corresponding variable created in advance, it includes:
[0089] Create type variables, SMD pad shape variables, SMD width variables, SMD length variables, plating attribute variables, DIP pad width variables, DIP pad length variables, DIP pad shape variables, drilling width variables, drilling length variables, and drilling shape variables in advance;
[0090] Obtain the pad type of the current row in the second pad data table and record it in the type variable, and the name of the type variable is PAD_TYPE;
[0091] If the pad type is SMD type, obtain the pad shape, the first width, and the first length of the current row, and record them in the SMD pad shape variable, the SMD width variable, and the SMD length variable respectively. The names of the SMD pad shape variable, the SMD width variable, and the SMD length variable are PAD_SHAPE, PAD_W, and PAD_H respectively;
[0092] If the pad type is DIP type, obtain the pad shape, the second width, the second length, the drilling shape, the third width, and the third length of the current row, and record them in the DIP pad shape variable, the DIP pad width variable, the DIP pad length variable, the drilling shape variable, the drilling width variable, and the drilling length variable respectively. Among them, the names of the DIP pad shape variable, the DIP pad width variable, the DIP pad length variable, the drilling shape variable, the drilling width variable, and the drilling length variable are DPAD_SHAPE, DPAD_SHAPE_W, DPAD_SHAPE_H, HOLE_SHAPE, HOLE_SHAPE_W, and HOLE_SHAPE_H respectively;
[0093] Obtain the plating attribute of the current row, and mark the plating attribute variable according to whether the plating attribute is a plated through hole pad. The name of the plating attribute is PAD_PTH;
[0094] In this embodiment, if the plating attribute is a plated through hole pad, mark the plating attribute variable as YES. If the plating attribute is a non-plated through hole pad, mark the plating attribute variable as NO. The variables are stored in the database, which is pre-created. After checking the pad type, pad shape, and pad size corresponding to the name of the problematic pad in each row, they are stored in the corresponding variables respectively, which is convenient for searching and calling when renaming the pad name of the current row.
[0095] Among them, the standard name template includes a first template and a second template;
[0096] The step of extracting pad data from the variables and performing preprocessing, and renaming the pad name of the current row according to the rules of the standard name template includes:
[0097] Obtain the pad type in the type variable;
[0098] If the pad type is SMD type, call the first template, and the first template includes a first fixed character, a second fixed character, and a third fixed character arranged in sequence;
[0099] Insert the pad type into the first template and write it in the form of the character SMD before the first fixed character;
[0100] Obtain the pad shape, the first width, and the first length from the SMD pad shape variable, the SMD width variable, and the SMD length variable respectively;
[0101] Insert the pad shape into the first template and write it after the third fixed character in the form of a shape character, where the shape characters include RE, CI, and OB;
[0102] Convert the first width and the first length into numerical types and perform preprocessing to generate a first width character and a first length character;
[0103] Write the first width character between the first fixed character and the second fixed character of the first template;
[0104] Write the first length character between the second fixed character and the third fixed character of the first template to generate a pad name that conforms to the naming rule;
[0105] If the pad type is DIP type, call the second template, where the second template includes a fourth fixed character, a fifth fixed character, a sixth fixed character, a seventh fixed character, an eighth fixed character, and a ninth fixed character arranged in sequence;
[0106] Generate an attribute character according to the mark of the electroplating attribute variable. If the mark of the electroplating attribute variable is YES, the generated attribute character is PTH. If the mark of the electroplating attribute variable is NO, the generated attribute character is NPTH;
[0107] Write the generated attribute character before the fourth fixed character in the second template;
[0108] Obtain the pad shape, the second width, the second length, the drill hole shape, the third width, and the third length from the DIP pad shape variable, the DIP pad width variable, the DIP pad length variable, the drill hole shape variable, the drill hole width variable, and the drill hole length variable respectively;
[0109] Convert the second width, the second length, the third width, and the third length into numerical types and perform preprocessing to generate a second width character, a second length character, a third width character, and a third length character;
[0110] Write the second width character between the fourth fixed character and the fifth fixed character of the second template, write the second length character between the fifth fixed character and the sixth fixed character of the second template, write the third width character between the seventh fixed character and the eighth fixed character of the second template, and write the third length character between the eighth fixed character and the ninth fixed character of the second template;
[0111] Write the pad shape in the form of shape characters between the sixth fixed character and the seventh fixed character of the second template, and write the drilling shape in the form of shape characters after the ninth fixed character of the second template to generate a pad name that conforms to the naming rule, where the shape characters include RE, CI, and OB.
[0112] In this embodiment, the preprocessing is to round the data converted to numerical type, take the first three digits, and fill 0 in the first digit if it is less than 3 digits; an example of renaming the pad name of the SMD type can be: SMD_aaaXbbb-##; where aaa and bbb are the first width and the first length respectively, X, -, _ are fixed characters, and ## is the pad shape; for the DIP type, an example of renaming the pad name with the attribute of PTH can be: PTH_aaaXbbb-##_cccXddd-**; for the DIP type, an example of renaming the pad name with the attribute of NPTH can be: NPTH_aaaXbbb-##_cccXddd-**; where ccc and ddd are the second width and the second length respectively, ## is the pad shape, and ** is the drilling shape. In this application, when the pad shape and / or the drilling shape is circular, the first width and the first length have the same numerical value, both representing the diameter of the pad, the second width and the second length have the same numerical value, both representing the diameter of the pad, and the third width and the third length have the same data, both representing the diameter of the drilling. This application determines the corresponding naming rule according to the pad type. Among them, aaa and bbb are 3-digit numerical values after rounding, and 0 is filled in the first digit if it is less than 3 digits. The renamed pad name includes information such as the pad type, pad size, and pad shape, so that under the unified naming rule, designers can also obtain most of the information of the pad only through the pad name, which is convenient for the subsequent development of pad design and improves work efficiency.
[0113] S4: Generate a pad storage table according to all the current pad data, and store the pad storage table in the standard package library.
[0114] In this embodiment, all the modified pad names are correctly named, and all the pad data are generated into a pad storage table and stored in the standard package library, which is convenient for subsequent viewing of the pad data and convenient for the unified management of the company.
[0115] Specifically, in step S1, that is, when receiving the pad data, the steps included in the pad data including the pad name are:
[0116] Receive the pad data and generate an initial pad table according to the pad data;
[0117] Establish a customer profile file in the database and store the initial pad table in the customer profile file;
[0118] In step S4, the step of storing the pad storage table into the standard package library includes:
[0119] Synchronously use the pad storage table to replace the initial pad table.
[0120] In this embodiment, the initial pad table comes from the design file. Since different companies may have different pad naming rules, the pad names that do not conform to the preset naming rules are modified. Then, a synchronization replacement update operation is performed on the problematic pad data in the current design file, that is, the initial pad table is deleted and the pad storage table is stored. Ensure that the pad data in the design file is synchronized with the pad data in the company's standard package library.
[0121] In some alternative implementation manners of this embodiment, after step S4, that is, the step of generating a pad storage table according to all current pad data and storing the pad storage table into the standard package library, the above electronic device may further perform the following steps:
[0122] Provide a front-end page and display the pad data that does not conform to the naming rules in a list box on the front-end page. Specifically, display the second pad data table in the list box on the front-end page.
[0123] Specifically, sort the data in the second pad data table according to the first English letter of the pad name, where the first English letter is sorted according to the order of the 26 letters. Of course, it is also possible to sort the pad names according to the corresponding pad size of the pad name.
[0124] In this embodiment, the pad data that does not conform to the naming rules is displayed on the front-end page, so that designers can clearly see which pad data does not conform to the naming rules; and it is sorted according to the order of the 26 English letters, so that the pad names with the same first letter can be arranged together, making it easier to view.
[0125] Further, pre-mark the pad names that do not conform to the preset naming rules;
[0126] On the front-end page, fill the bottom surface of the unmarked pad names with a first color and fill the bottom surface of the marked pad names with a second color.
[0127] In this embodiment, the first color can be green and the second color can be red. For example: the bottom surface of the unmarked pad names is filled with green, and the bottom surface of the marked pad names is filled with red, so that relevant personnel can clearly know which pad names are incorrect.
[0128] After step S3, that is, if not, the step of renaming the pad names that do not conform to the naming rule, the above electronic device may further perform the following steps:
[0129] Change all the updated pad names to the first color and output an update report, where the update report includes the original pad names and the renamed pad names.
[0130] In this embodiment, the content of the update report is a list of processed named pad names, which realizes the recording of the pad name modification process for archiving.
[0131] In some optional implementation manners of this embodiment, after step S4, that is, the step of generating a pad storage table according to all current pad data and storing the pad storage table in the standard package library, it includes:
[0132] Provide a front-end page, where the front-end page is provided with a type selection box and a data input box. The pad types include SMD type and DIP type; when the user selects SMD type in the type selection box and the pad shape is circular (Circle, CI), the width (W:) input box and the length (H:) input box in the data input box are blocked to prevent the user from inputting data, and the diameter (D:) input box is activated to receive the data input by the user; among them, the data input by the user in the diameter (D:) input box is the circular diameter;
[0133] When the user selects SMD type in the type selection box and the pad shape is non-circular, the diameter (D:) input box is blocked, and the width (W:) input box and the length (H:) input box are activated to receive the data input by the user;
[0134] When the user selects DIP type in the type selection box and the pad attribute is PTH or NPTH, determine the blocked or activated input boxes according to the user's selection of the drilling type;
[0135] When the user selects the drilling shape as circular (Circle, CI) in the type selection box, the width (W:) and length (H:) input boxes are blocked, and the diameter (D:) input box is activated;
[0136] When the user selects the drilling shape as non-circular in the type selection box, such as: oval (Oval, OB) or rectangle (Rectangle, RE), the diameter (D:) input box is blocked, and the width (W:) input box and the length (H:) input box are activated;
[0137] After receiving the query instruction, query in the standard package library to determine whether there is pad data that is consistent with the pad type and pad shape selected by the user, and pad data that is consistent with the pad size input by the user, and output the query result to the user; where the pad size includes width, length, and diameter.
[0138] In this embodiment, the front-end page of the present application provides a numerical unit selection box, including numerical units MM and mils. According to the user's selection of the numerical unit, the numerical value entered by the user in the input box is converted into the corresponding selected unit. By providing a queryable front-end page, it is convenient for designers to query the pad data in the standard package library. If the queried pad data already exists, there is no need to repeat the design of the corresponding pad, reducing the work of repeatedly creating pads, reducing unnecessary production risks, resource waste, and economic losses, and improving work efficiency.
[0139] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), etc., or a Random Access Memory (RAM), etc.
[0140] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and they can be executed in other orders. Moreover, at least some of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same time, but can be executed at different times. Their execution order does not necessarily have to be sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0141] Further reference Figure 4 to Figure 2 As an implementation of the method shown above, the present application provides an embodiment of a device for renaming pads. This device embodiment corresponds to the method embodiment shown in Figure 2 and this device can be specifically applied to various electronic devices.
[0142] As Figure 4As shown in the figure, the device 300 for renaming pads in this embodiment includes: a receiving module 301, an inspection module 302, a naming module 303, and a storage module 304. Among them:
[0143] The receiving module 301 is configured to receive pad data, where the pad data includes a pad name and a pad type;
[0144] The inspection module 302 is configured to check whether all pad names fully comply with a preset naming rule;
[0145] The naming module 303 is configured to, when the pad name does not comply with the naming rule, call a preset standard name template according to the pad type, and rename all pad names that do not comply with the naming rule through the standard name template; and
[0146] The storage module 304 is configured to generate a pad storage table according to all current pad data, and store the pad storage table in a standard package library.
[0147] The naming module 302 includes a splitting unit, a generating unit, a first recognition unit, and a renaming unit. The splitting unit is configured to split the pad data into first pad data and second pad data, where the first pad data includes a pad name that complies with the naming rule, and a pad type, a pad shape, and a pad size that have a one-to-one correspondence with the pad name; the second pad data includes a pad name that does not comply with the naming rule, and a pad type, a pad shape, and a pad size that have a one-to-one correspondence with the pad name; the generating unit is configured to generate a second pad data table according to the second pad data; the first recognition unit is configured to recognize the current row data in the second pad data table and record it in a corresponding variable created in advance; the renaming unit is configured to extract pad data from the variable and perform preprocessing, and rename the pad name of the current row according to the rules of the standard name template for the preprocessed pad data.
[0148] The inspection module includes a second recognition unit, a first detection unit, a second detection unit, and a determination unit. The second recognition unit is configured to recognize a pad type, a pad size, and a pad shape corresponding to the pad name; the first detection unit is configured to detect a string corresponding to the pad name according to the pad type, and when the detected string is consistent with the pad type, detect the data type of the string corresponding to the pad name according to the pad size; the second detection unit is configured to, when the data type of the detected string is numeric, detect the string corresponding to the pad name according to the pad shape; the determination unit is configured to determine that the pad name complies with the preset naming rule when the string is consistent with the pad shape.
[0149] In some alternative implementation manners of this embodiment, the above device 400 further includes: a providing module, a sorting module, a marking module, a filling module, and an output module. The providing module is configured to provide a front-end page and display the pad data that does not conform to the naming rule in a list box on the front-end page; the sorting module is configured to sort the data in the second pad data table according to the first English letter of the pad name; the marking module is configured to mark the pad names that do not conform to the preset naming rule; the filling module is configured to fill the bottom surface of the unmarked pad names with a first color and fill the bottom surface of the marked pad names with a second color. The output module is configured to change all the renamed pad names to the first color and output an update report, where the update report includes the original pad names and the renamed pad names.
[0150] In some alternative implementation manners of this embodiment, the above providing module is further configured to: provide a front-end page, where the front-end page is provided with a type selection box and a data input box. The providing module includes a third recognition unit, a shielding unit, an activation unit, a query unit, and a second output unit. The third recognition unit is configured to recognize the pad type, pad attribute, and pad shape selected by the user in the type selection box and transmit the pad shape to the shielding unit and the activation unit. The shielding unit is configured to shield the width (W:) input box and the length (H:) input box in the data input box when the pad shape transmitted by the third recognition unit is circular, and shield the diameter (D:) input box when the pad shape transmitted by the third recognition unit is non-circular. The activation unit is configured to activate the diameter (D:) input box when the pad shape transmitted by the third recognition unit is circular; and activate the width (W:) input box and the length (H:) input box when the pad shape transmitted by the third recognition unit is non-circular.
[0151] This application determines the pads that do not conform to the naming rule by checking the pad names, and renames the pads according to the unified naming rule, so that the naming of all pads conforms to the unified rule, meets the company's specifications, facilitates the management of pads, and enables subsequent personnel to better maintain the package design; reduces the work of repeatedly creating new pads and improves work efficiency; improves the accuracy of design, reduces unnecessary production risks, resource waste, and economic losses; and at the same time provides a front-end page for users to check whether the corresponding pads exist, avoiding duplicate pad design work.
[0152] To solve the above technical problems, an embodiment of this application further provides a computer device. Specifically, please refer to Figure 5 , Figure 5 which is the basic structural block diagram of the computer device in this embodiment.
[0153] The computer device 200 includes a memory 201, a processor 202, and a network interface 203 that are communicatively connected to each other via a system bus. It should be noted that only the computer device 200 with components 201 - 203 is shown in the figure, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Among them, those skilled in the art of this technology can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field - programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0154] The computer device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device can perform human - machine interaction with the user through means such as a keyboard, a mouse, a remote control, a touchpad, or a voice - controlled device.
[0155] The memory 201 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disks, multimedia cards, card - type memories (such as SD or DX memories, etc.), random access memory (RAM), static random access memory (SRAM), read - only memory (ROM), electrically erasable programmable read - only memory (EEPROM), programmable read - only memory (PROM), magnetic memories, magnetic disks, optical disks, etc. In some embodiments, the memory 201 can be an internal storage unit of the computer device 200, such as the hard disk or memory of the computer device 200. In other embodiments, the memory 201 can also be an external storage device of the computer device 200, such as a plug - in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the computer device 200. Of course, the memory 201 can also include both the internal storage unit and the external storage device of the computer device 200. In this embodiment, the memory 201 is generally used to store the operating system and various application software installed on the computer device 200, such as the program code of the method for renaming pads. In addition, the memory 201 can also be used to temporarily store various data that have been output or will be output.
[0156] In some embodiments, the processor 202 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 202 is generally used to control the overall operation of the computer device 200. In this embodiment, the processor 202 is used to run the program code stored in the memory 201 or process data, such as running the program code of the X method.
[0157] The network interface 203 may include a wireless network interface or a wired network interface. The network interface 203 is generally used to establish a communication connection between the computer device 200 and other electronic devices.
[0158] The present application also provides another implementation manner, that is, to provide a computer-readable storage medium storing a program for renaming pads. The program for renaming pads can be executed by at least one processor, so that the at least one processor executes the steps of the method for renaming pads as described above.
[0159] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0160] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The accompanying drawings show the preferred embodiments of the present application, but do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure content of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements for some of the technical features. Any equivalent structure directly or indirectly using the content of the specification and drawings of the present application in other related technical fields shall be similarly within the scope of the patent protection of the present application.
Claims
1. A method for renaming pads, characterized in that, it includes the following steps: Receiving pad data, where the pad data includes a pad name and a pad type; Checking whether all of the pad names fully conform to a preset naming rule; If not, then calling a preset standard name template according to the pad type, and renaming all pad names that do not conform to the naming rule through the standard name template; Generating a pad storage table based on all current pad data, and storing the pad storage table in a standard package library; The standard name template includes a first template and a second template, the pad types include SMD type and DIP type, and the step of calling a preset standard name template according to the pad type and renaming all pad names that do not conform to the naming rule through the standard name template includes: If the pad type is the SMD type, then writing the pad type character, pad shape character, first width character, and first length character corresponding to the SMD type into the first template; if the pad type is the DIP type, then writing the attribute character, second width character, second length character, third width character, third length character, pad shape character, and drilling shape character corresponding to the DIP type into the second template.
2. The method for renaming pads according to claim 1, characterized in that, the step of renaming all pad names that do not conform to the naming rule through the standard name template includes: Splitting the pad data into first pad data and second pad data, where the first pad data includes pad names that conform to the naming rule, and the pad type, pad shape, and pad size that have a one-to-one correspondence with the pad names; the second pad data includes pad names that do not conform to the naming rule, and the pad type, pad shape, and pad size that have a one-to-one correspondence with the pad names; Generating a second pad data table according to the second pad data; Performing the following renaming operation on each pad name in the second pad data table in sequence: Identifying the current row data in the second pad data table and recording it in a corresponding variable created in advance; Extracting pad data from the variable and performing preprocessing, and renaming the pad name of the current row according to the rules of the standard name template for the preprocessed pad data.
3. The method for renaming pads according to claim 2, characterized in that, the pad data further includes a pad shape, plating attribute, pad size, drilling size, and drilling shape, the pad size includes a first width and a first length, and the drilling size includes a second width and a second length; in the step of identifying the current row data in the second pad data table and recording it in a corresponding variable created in advance, it includes: Pre-creating a type variable, SMD pad shape variable, SMD width variable, SMD length variable, plating attribute variable, DIP pad width variable, DIP pad length variable, DIP pad shape variable, drilling width variable, drilling length variable, and drilling shape variable; Obtain the pad type of the current row in the second pad data table and record it in the type variable named PAD_TYPE; If the pad type is SMD type, obtain the pad shape, the first width, and the first length of the current row and record them in the SMD pad shape variable, the SMD width variable, and the SMD length variable respectively. The names of the SMD pad shape variable, the SMD width variable, and the SMD length variable are PAD_SHAPE, PAD_W, and PAD_H respectively; If the pad type is DIP type, obtain the pad shape, the second width, the second length, the drill shape, the third width, and the third length of the current row and record them in the DIP pad shape variable, the DIP pad width variable, the DIP pad length variable, the drill shape variable, the drill width variable, and the drill length variable respectively. Among them, the names of the DIP pad shape variable, the DIP pad width variable, the DIP pad length variable, the drill shape variable, the drill width variable, and the drill length variable are DPAD_SHAPE, DPAD_SHAPE_W, DPAD_SHAPE_H, HOLE_SHAPE, HOLE_SHAPE_W, HOLE_SHAPE_H respectively; Obtain the plating attribute of the current row and mark the plating attribute variable according to whether the plating attribute is a plated through hole pad. The name of the plating attribute is PAD_PTH.
4. A method for renaming pads according to claim 3, characterized in that, The step of extracting pad data from the variables and performing preprocessing, and renaming the pad name of the current row according to the rules of the standard name template includes: Obtain the pad type in the type variable; If the pad type is SMD type, call the first template, which includes the first fixed character, the second fixed character, and the third fixed character arranged in sequence; Insert the pad type into the first template and write it in front of the first fixed character in the form of the character SMD; Obtain the pad shape, the first width, and the first length in the SMD pad shape variable, the SMD width variable, and the SMD length variable respectively; Insert the pad shape into the first template and write it after the third fixed character in the form of a shape character, where the shape characters include RE, CI, and OB; Convert the first width and the first length into numerical types and perform preprocessing to generate the first width character and the first length character; Write the first width character between the first fixed character and the second fixed character of the first template; Write the first length character between the second fixed character and the third fixed character of the first template to generate a pad name that conforms to the naming rule; If the pad type is DIP type, call the second template, which includes the fourth fixed character, the fifth fixed character, the sixth fixed character, the seventh fixed character, the eighth fixed character, and the ninth fixed character arranged in sequence; Generate an attribute character according to the mark of the plating attribute variable; Write the generated attribute characters before the fourth fixed character in the second template; Obtain the pad shape, second width, second length, drill shape, third width, and third length in the DIP pad shape variable, DIP pad width variable, DIP pad length variable, drill shape variable, drill width variable, and drill length variable, respectively; Convert the second width, second length, third width, and third length into numerical types, and perform preprocessing to generate second width characters, second length characters, third width characters, and third length characters; Write the second width character between the fourth fixed character and the fifth fixed character of the second template, write the second length character between the fifth fixed character and the sixth fixed character of the second template, write the third width character between the seventh fixed character and the eighth fixed character of the second template, and write the third length character between the eighth fixed character and the ninth fixed character of the second template; Write the pad shape in the form of shape characters between the sixth fixed character and the seventh fixed character of the second template, and write the drill shape in the form of shape characters after the ninth fixed character of the second template to generate a pad name that conforms to the naming rule, where the shape characters include RE, CI, and OB.
5. A method for renaming pads according to claim 1, wherein, after the step of receiving pad data, it includes: Generate an initial pad table according to the pad data; Create a customer profile file in the database and store the initial pad table in the customer profile file; After the step of storing the pad storage table in the standard package library, it further includes: Synchronously use the pad storage table to replace the initial pad table.
6. A method for renaming pads according to claim 1, wherein, the pad data further includes pad size and pad shape; the step of checking whether the pad name fully conforms to the preset naming rule includes: Identify the pad type, pad size, and pad shape corresponding to the pad name; Detect the string corresponding to the pad name according to the pad type; If the detected string is consistent with the pad type, then detect the data type of the string corresponding to the pad name according to the pad size; If the detected data type of the string is numerical, then detect the string corresponding to the pad name according to the pad shape; If the string is consistent with the pad shape, it is determined that the pad name conforms to the preset naming rule.
7. A method for renaming pads according to claim 6, wherein, the step of detecting the string corresponding to the pad name according to the pad type includes: If the identified pad type is SMD type, then detect whether the 4th, 8th, and 12th characters of the pad name are the first fixed character, the second fixed character, and the third fixed character stored in advance, respectively; If so, perform a preliminary split of the pad name with the first fixed character as the boundary to obtain a first main string and a second main string, and confirm whether the first main string is SMD, If the first main string is SMD, split the second main string with the second fixed character as the delimiter to obtain a first sub-string and a second sub-string; Split the first sub-string with the third fixed character as the delimiter to obtain a first secondary sub-string and a second secondary sub-string; The step of detecting the string corresponding to the pad name according to the pad shape if the data type of the detected string is numeric includes: Identify the data types of the first secondary sub-string and the second secondary sub-string; If the first secondary sub-string and the second secondary sub-string are numeric, confirm whether the second sub-string is RE or CI or OB; The step of determining that the pad name conforms to the preset naming rule if the string is consistent with the pad shape is: If the second sub-string is RE or CI or OB, it is considered that the pad name conforms to the naming rule; Wherein, the first main string and the second main string are all the characters before the first fixed character and after the second fixed character in the pad name respectively; the first sub-string and the second sub-string are all the characters before the second fixed character and after the second fixed character in the sub-string respectively; the first secondary sub-string and the second secondary sub-string are all the characters before the third fixed character and after the third fixed character in the first sub-string respectively; The step of identifying the pad type, pad size and pad shape corresponding to the pad name includes: If the identified pad type is DIP type, identify the plating attribute, pad size, pad shape, drill size and drill shape corresponding to the pad name; The step of detecting the string corresponding to the pad name according to the pad type includes: If the plating attribute is PTH, detect whether the 4th, 8th, 12th, 15th, 19th, 23rd characters of the pad name are the pre-stored fourth fixed character, fifth fixed character, sixth fixed character, seventh fixed character, eighth fixed character and ninth fixed character respectively; If the plating attribute is NPTH, detect whether the 5th, 9th, 13th, 16th, 20th, 24th characters of the pad name are the pre-stored fourth fixed character, fifth fixed character, sixth fixed character, seventh fixed character, eighth fixed character and ninth fixed character respectively; If so, perform a preliminary split on the pad name with the fourth fixed character and the seventh fixed character as the delimiters to obtain a third main string, a fourth main string and a fifth main string, and confirm whether the third main string is PTH or NPTH, If the third main string is PTH or NPTH, split the fourth main string with the sixth fixed character to obtain a third sub-string and a fourth sub-string; Split the fifth main string with the ninth fixed character as the delimiter to obtain a fifth sub-string and a sixth sub-string; Split the third sub-string with the fifth fixed character as the delimiter to obtain a third secondary sub-string and a fourth secondary sub-string; Split the fifth sub-string at the eighth fixed character to obtain a fifth secondary sub-string and a sixth secondary sub-string; The step of detecting the string corresponding to the pad name according to the pad shape if the data type of the detected string is numerical includes: Identify the data types of the third secondary sub-string, the fourth secondary sub-string, the fifth secondary sub-string, and the sixth secondary sub-string; If the third secondary sub-string, the fourth secondary sub-string, the fifth secondary sub-string, and the sixth secondary sub-string are numerical, confirm whether the fourth sub-string and the sixth sub-string are RE or CI or OB; The step of determining that the pad name conforms to a preset naming rule if the string is consistent with the pad shape is: If the fourth sub-string and the sixth sub-string are RE or CI or OB, it is considered that the pad name conforms to the naming rule; Wherein, the third main string and the fifth main string are respectively all the characters in the pad name before the fourth fixed character and after the seventh fixed character; the fourth main string is all the characters in the pad name between the fourth fixed character and the seventh fixed character; the third sub-string and the fourth sub-string are respectively all the characters in the fourth main string before the sixth fixed character and after the sixth fixed character; the fifth sub-string and the sixth sub-string are respectively all the characters in the fifth main string before the ninth fixed character and after the ninth fixed character; the third secondary sub-string and the fourth secondary sub-string are respectively all the characters in the third sub-string before the fifth fixed character and after the fifth fixed character; the fifth secondary sub-string and the sixth secondary sub-string are respectively all the characters in the fifth sub-string before the eighth fixed character and after the eighth fixed character.
8. An apparatus for renaming pads Characterized in that The apparatus for renaming pads is used to execute the method for renaming pads according to any one of claims 1 to 7. The apparatus for renaming pads includes: A receiving module, configured to receive pad data, where the pad data includes a pad name and a pad type; An inspection module, configured to inspect whether the pad name completely conforms to a preset naming rule; A naming module, configured to, when the pad name does not conform to the naming rule, call a preset standard name template according to the pad type, and rename all the pad names that do not conform to the naming rule through the standard name template; and A storage module, configured to generate a pad storage table according to all current pad data, and store the pad storage table in a standard package library.
9. A computer device Characterized in that It includes a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the method for renaming pads according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium Characterized in that A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for renaming pads according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Digital Satellite AOS Protocol Telemetry Source Code Artificial Intelligence Writing Method
CN109062565A
Method and apparatus for carrying out element packaging on graphic data based on coordinates
CN110414123A