Device identification method and device, equipment and readable storage medium

By obtaining and displaying the multiple pairs of annotation relationships of the target devices on the printed circuit board, and drawing a table to display the corresponding relationship between port numbers and functions, the problems of poor accuracy and time-consuming in manual identification are solved, and the accuracy and efficiency of device identification are improved.

CN119538851APending Publication Date: 2025-02-28SUZHOU YUANKONG ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311091640.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, there are problems of poor accuracy and time-consuming pin numbers and functions of components on manual identification of printed circuit boards.

Method used

By obtaining multiple pairs of annotation relationships for the target device in the printed circuit board and displaying these relationships, a table is drawn to show the correspondence between the port number and the function.

Benefits of technology

It improves the accuracy and efficiency of device identification, avoids the accuracy and time-consuming caused by manual identification, ensures accurate display of port numbers and functions, and reduces the overlap of labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538851A_ABST
    Figure CN119538851A_ABST
Patent Text Reader

Abstract

The invention discloses a device identification method, device and equipment and a readable storage medium, and the device identification method comprises the steps: obtaining a plurality of pairs of annotation relationships of a target device in a printed circuit board; the annotation relation is used for representing the corresponding relation between one port number of the target device and the function of the target device; and displaying the multiple pairs of annotation relationships. According to the device identification method, device and equipment and the readable storage medium provided by the invention, the defects of poor accuracy and long consumed time caused by manual marking are avoided, and the device identification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of printed circuit board design, and more particularly to a device identification method, apparatus, equipment and readable storage medium. Background Art

[0002] In order to facilitate the assembly and maintenance of components on the printed circuit board, the printed circuit board has a silk screen layer for annotation. The silk screen layer is a text layer, which can be used to mark component position numbers, board numbers, version numbers, anti-static labels, bar codes, etc.

[0003] For some special components, the silk screen layer will print the pin numbers of the components and the functions corresponding to the pin numbers. In the related art, these special components are manually marked.

[0004] However, this manual labeling method has the disadvantages of poor accuracy and long time consumption. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a device identification method, apparatus, equipment and readable storage medium, which can solve the problems of poor accuracy and long time consumption in manual identification.

[0006] To achieve the above-mentioned purpose, one aspect of an embodiment of the present application provides a device identification method, including: obtaining multiple pairs of annotation relationships of a target device in a printed circuit board; the annotation relationships are used to characterize the correspondence between a port number of the target device and its function; and displaying the multiple pairs of annotation relationships.

[0007] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application further provides a device identification device for a printed circuit board, the device comprising: an acquisition module for acquiring multiple pairs of annotation relationships of a target device in a printed circuit board; the annotation relationships are used to characterize the correspondence between a port number of the target device and its function; and a processing module for displaying the multiple pairs of annotation relationships.

[0008] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application further provides an electronic device, comprising: a memory and a processor; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method as described above.

[0009] To achieve the above objectives, another aspect of an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method described above.

[0010] It can be seen that the device identification method, apparatus, equipment and readable storage medium provided in the embodiments of the present application, by obtaining multiple pairs of annotation relationships of the target device and drawing a table based on the multiple pairs of annotation relationships, avoids the shortcomings of poor accuracy and long time consumption caused by manual marking, and is beneficial to improving the device identification efficiency.

[0011] In addition, multiple pairs of annotation relationships of the target device are displayed in the form of a table, so that multiple pairs of annotation relationships of the target device can be displayed in a centralized manner, avoiding the scattered marking of port numbers and the functions corresponding to the port numbers in a small area close to the target device, avoiding the overlapping of labels of different devices, and helping to improve the device identification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0013] Figure 1 A logo diagram of a device JTPM1 of the related art;

[0014] Figure 2 A flowchart of a device identification method provided in an embodiment of the present application;

[0015] Figure 3 Partial annotation relationship of some components of the printed circuit board provided by the embodiment of the present application;

[0016] Figure 4 Data of the screened JTPM1 device provided in the embodiments of the present application;

[0017] Figure 5 A logo diagram of a device JTPM1 provided in an embodiment of the present application;

[0018] Figure 6 A logo diagram of another device JTPM1 provided in an embodiment of the present application;

[0019] Figure 7 A logo diagram of another device JTPM1 provided in an embodiment of the present application;

[0020] Figure 8 A logo diagram of another device JTPM1 provided in an embodiment of the present application;

[0021] Fig. 9 A schematic diagram of a device identification apparatus provided in an embodiment of the present application;

[0022] Fig.10A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] As described in the background art, the related art uses a manual marking method to mark components, and this manual marking method has the disadvantages of poor accuracy and long time consumption. Figure 1 The JTPM1 device of the related art is shown below. Figure 1 The device JTPM1 is taken as an example to describe the identification method of the related art, wherein the device JTPM1 is an interface of a secure TPM (Trusted Platform Module) chip.

[0024] refer to Figure 1 , device JTPM1 has 20 ports. The silk screen layer of the printed circuit board can be printed with 20 port numbers and the functions corresponding to these 20 port numbers. For example, the function corresponding to port number 1 is null, the function corresponding to port number 5 is GND, the function corresponding to port number 10 is TPM_MOSO, etc. The port number can be as follows Figure 1 As shown in the port box, the function corresponding to the port number can be Figure 1 As shown, the port number is located on one side of the port box; alternatively, the port number and the function corresponding to the port number may be located in the port box of the device JTPM1; alternatively, the port number and the function corresponding to the port number may be located outside the port box of the device JTPM1.

[0025] As can be seen from the above, users need to identify not only the port number, but also the function corresponding to the port number. With the development of technology, the number of devices on printed circuit boards has gradually increased. If only manual identification is relied on, it is very easy to make mistakes and take a long time.

[0026] In view of this, an embodiment of the present application provides a device identification method, which can automatically obtain multiple pairs of annotation relationships of the target device and display the multiple pairs of annotation relationships, avoiding the shortcomings of poor accuracy and long time consumption caused by manual identification, and is conducive to improving the device identification efficiency.

[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0028] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0029] Figure 2 A flowchart of a device identification method provided in an embodiment of the present application. Figure 2 The device identification method provided in the embodiment of the present application may include the following steps:

[0030] S100, obtaining multiple pairs of annotation relationships of target components in a printed circuit board.

[0031] Specifically, a printed circuit board (PCB) may be provided with multiple devices, each of which has its own bit number (REFDES) as an identification mark. The bit numbers of all devices on the PCB are not repeated, that is, each device has a unique bit number different from other devices. Each device has at least two pairs of annotation relationships, that is, among the multiple devices on the printed circuit board, some devices may have two pairs of annotation relationships, and some devices may have more than two pairs of annotation relationships. Among them, the annotation relationship can represent the correspondence between a port number (PIN_NUMBER) and a function (PIN_NAME) of the target device.

[0032] Figure 3 This is a partial annotation relationship of some components of the printed circuit board provided in the embodiment of the present application. For example, Figure 3 , the device with the bit number FKA9 has two pairs of annotation relationships. Specifically, the device with the bit number FKA9 has two port numbers 1 and 2. The function corresponding to port number 1 is FB1, and the function corresponding to port number 2 is FB2. The device with the bit number JTPM1 has 20 pairs of annotation relationships. Specifically, JTPM1 has 20 port numbers 1, 2, ..., 19, 20. The functions corresponding to port numbers 1, 2, 3, 4, 8, 9, 11, 15, 16, 18, and 20 are all null values. The function corresponding to port number 5 is GND, the function corresponding to port number 6 is VCCTPM, ..., the function corresponding to port number 17 is IPQ_TPM_R_N, and the function corresponding to port number 19 is TPM_RST_N.

[0033] Acquiring multiple pairs of annotation relationships of target devices may include the following steps:

[0034] S110, acquiring attribute information of all components of the printed circuit board; wherein the attribute information may include the bit number of the component and multiple pairs of annotation relationships corresponding to the bit number of the component;

[0035] Specifically, the design file of the PCB design software Cadence Allegro uses an object tree structure to store information, and each object has its own properties. The device bit number is an item in this object tree. Skill language is a development interface provided by Cadence Allegro to users. All objects in the object tree can be accessed and modified using Skill language, and automated operations can be completed using interface functions and SKILL language programming. The following uses the example of using Skill language to program Cadence Allegro to display multiple pairs of annotation relationships to describe the device identification method provided in the embodiment of the present application.

[0036] The corresponding automated operation of step S110 in Cadence Allegro may be as follows:

[0037] Select the Reports window in Tools in the Cadence Allegro software directory list; trigger the New / Edit button, and the Extract UI interface appears; select the Data Fields sub-interface in the Extract UI interface; select COMPONENT_PIN in the Select datebase view option in the Data Fields sub-interface; select REFDES, PIN_NUMBER, and PIN_NAME in the Avalilable Fields Click to select option in the Data Fields sub-interface; where REFDES represents the bit number mentioned above, PIN_NUMBER represents the port number mentioned above, and PIN_NAME represents the function mentioned above; click the save button in the Extract UI interface to save the file in .txt format;

[0038] Return to the Reports window and enter the report save format as .csv in the Output File of the Reports window, check the Write Report option, trigger the Browse button to select the .txt file saved in the previous step, and trigger the Report button to generate a .csv file in the PCB folder. Figure 3 The report shown. It should be noted that Figure 3 It is just an exemplary display, which only displays part of the .csv report of a certain PCB, and some components of the PCB are not displayed.

[0039] S120, obtaining the bit number of the target device;

[0040] Specifically, it is mentioned above that each device has a unique bit number (REFDES) that is different from other devices. The user can select the target device or input the bit number of the target device through an input device such as a keyboard, a mouse, a touch screen, etc. The user can select the target device by boxing the device or clicking on the device. When the user selects the target device, the method provided in the embodiment of the present application may include: obtaining the user's selection, and using the bit number of the target device obtained according to the user's selection.

[0041] Of course, the user can also input certain conditions in advance through the input device. In this case, the method provided in the embodiment of the present application may include: obtaining the conditions input by the user, and filtering out the target devices that meet the conditions according to the conditions input by the user through all devices of the PCB, and obtaining the bit number of the target device. For example: the user's preset condition is: devices with a port number greater than 10; then all devices of the PCB can be traversed to filter out the bit numbers of one or more devices with a port number greater than 10. For another example: the user's preset condition is: devices with bit numbers such as JTPM*, FP1*, etc. Then the program can traverse all devices of the PCB to filter out the bit numbers of devices that meet the conditions.

[0042] When the user selects multiple devices, or inputs the bit numbers of multiple devices, or there are multiple devices that meet the user's preset conditions, the method provided in the embodiment of the present application may include: sorting the multiple devices according to certain rules, and then completing the steps mentioned below one by one. The sorting rules may be: the order selected by the user, the order input by the user, the sorting of the first letters of the bit numbers of the devices, the sorting of the distribution of the devices on the PCB board, etc.

[0043] S130. Filter out multiple pairs of annotation relationships corresponding to the bit numbers of the target devices from the attribute information of all devices on the printed circuit board.

[0044] Specifically, you can use functions such as tempTxtInPort to analyze the .csv report mentioned above, and find multiple pairs of annotation relationships corresponding to the bit number of the target device. You can also use functions such as Add Text to import multiple pairs of annotation relationships corresponding to the bit number of the target device into the PCB board. For example, if the bit number of the target device is JTPM1, you can Figure 3 In the .csv report shown, multiple pairs of annotation relationships corresponding to the position number JTPM1 are found, and the multiple pairs of annotation relationships are imported into the PCB board.

[0045] It should be noted that Figure 3 The multiple pairs of annotations corresponding to a device in the .csv report are arranged from top to bottom in the ascending order of the port numbers in the multiple pairs of annotations. However, in some .csv reports, the multiple pairs of annotations for a device are out of order.

[0046] In view of this, in order to facilitate the drawing of the table mentioned below and subsequent viewing by the operator, optionally, the acquisition of multiple pairs of annotation relationships of the target device mentioned in the embodiment of the present application may also include: S140, sorting the multiple pairs of annotation relationships corresponding to the bit numbers of the target device according to the size of the port numbers.

[0047] Specifically, after generating the .csv report and before importing multiple pairs of annotation relationships of the target device into the PCB board, or after importing multiple pairs of annotation relationships of the target device into the PCB board, these annotation relationships can be arranged in ascending order (or descending order) of the port number.

[0048] In addition, considering that some devices have empty pins, that is, in the multiple pairs of annotation relationships corresponding to the device bit numbers, the functions corresponding to some port numbers are empty values. For example: Figure 3 In the multiple pairs of annotation relationships where the device bit number is JTPM1, the functions corresponding to port numbers 1, 2, 3, 4, 8, 9, 11, 15, 16, 18, and 20 are all null values.

[0049] In view of this, in order to reduce the space occupied by displaying multiple pairs of annotation relationships below, the acquisition of multiple pairs of annotation relationships of the target device mentioned in the embodiment of the present application may also include: S150, from the multiple pairs of annotation relationships corresponding to the position numbers of the target device, filter out multiple pairs of annotation relationships whose functions are not empty values.

[0050] Specifically, after generating the .csv report and before importing multiple pairs of annotation relationships of the target device into the PCB board, or after importing multiple pairs of annotation relationships of the target device into the PCB board, these multiple pairs of annotation relationships can be filtered to filter out multiple pairs of annotation relationships with null functions and retain multiple pairs of annotation relationships with non-null functions. Figure 3 After filtering out the multiple pairs of annotation relationships in JTPM1 with null values, it can be transformed into Figure 4 .

[0051] In addition, considering that the characters of the functions corresponding to some port numbers are long. In order to reduce the space occupied by displaying multiple pairs of annotation relationships, the multiple pairs of annotation relationships of the target device mentioned in the embodiment of the present application may also include: S160, according to the abbreviation relationship, abbreviating the functions in the multiple pairs of annotation relationships, and the abbreviated functions and the port number form a new pair of annotation relationships. Figure 3 The functions in the multiple pairs of annotation relationships in JTPM1 in the above example can be abbreviated to Figure 4 The abbreviation relationship may be preset, which may represent the correspondence between the original function and the abbreviated function. Figure 3For the device with the median number JTPM1, the function corresponding to port number 10 is TPM_MOSO. Look for the abbreviation relationship and find that the abbreviation corresponding to TPM_MOSO is MOSO. Port number 10 and MOSO form a new annotation relationship.

[0052] The above describes in detail how to obtain multiple pairs of annotation relationships of the target device. The following describes the steps after obtaining multiple pairs of annotation relationships of the target device:

[0053] S200, displaying multiple pairs of annotation relationships.

[0054] For example, using Figure 4 The device number shown is JTPM1, which is drawn on the silk screen layer of the PCB board as follows: Figure 5 , Figure 6 as well as Figure 7 Shown are multiple pairs of annotation relationships with reference number JTPM1.

[0055] There are two aspects to consider when drawing multiple pairs of annotation relationships on PCB. One aspect is the presentation form of multiple pairs of annotation relationships, and the other aspect is the placement of multiple pairs of annotation relationships. Among them, the presentation form of multiple pairs of annotation relationships can refer to: the overall shape of multiple pairs of annotation relationships, the specifications of the strings (port numbers and functions) of multiple pairs of annotation relationships, the form of the frame wrapped outside the annotation relationships, etc. Among them, the strings of multiple pairs of annotation relationships cannot be too large to affect the overall aesthetics, nor too small to be unrecognizable. In other words, the size of the text in multiple pairs of annotation relationships can be equal to or slightly smaller than the size specification of the string that has completed the position number identification on the PCB.

[0056] In addition, the character specifications of the strings of multiple pairs of annotation relationships can be fixed or variable. The character specifications of the string can refer to: character width, character height, distance between characters, etc. When the character specifications are variable, these character specifications can be adjusted uniformly or separately. Figure 5 , Figure 6 When it is displayed in the form of a table, and the size specifications of the grid of the table and the character specifications of the strings of multiple pairs of annotation relationships are variable, the two can be enlarged or reduced in equal proportion or unequal proportion, or only one of them can be changed. Among them, the size specifications of the grid can refer to the width and length of the grid. In addition, when the grid and the string in the grid have multiple preset specifications, the multiple size specifications and the multiple character specifications can be set one by one. For example, when the grid selects the first size specification, the string in the grid can use the first character specification corresponding to the first size specification. Alternatively, the size specifications of the grid and the character specifications of the string in the grid can be changed separately. For example, when the grid selects the first size specification, the string in the grid can use the second character specification.

[0057] Since different devices have different numbers of ports and different devices have different surrounding spaces, the overall shapes of multiple pairs of annotation relationships need to be switched in a variety of ways. Multiple pairs of annotation relationships can change the overall shapes of multiple pairs of annotation relationships by adjusting the number of rows and columns, the number of logarithms of annotation relationships in each row, the number of logarithms of annotation relationships in each column, etc., so that multiple pairs of annotation relationships can be shown by inserting spaces around the device. The overall shapes of multiple pairs of annotation relationships can be regular graphics such as strips, squares, rectangles, etc., which are set on one side of the corresponding device, or the overall shapes of multiple pairs of annotation relationships can be continuous special-shaped graphics such as L-shaped, U-shaped, Z-shaped, and ring-shaped, which are set around the corresponding device; or, multiple pairs of annotation relationships can be split into multiple groups, and multiple groups can be set around the corresponding device. The overall shapes of these multiple pairs of annotation relationships can have switching priorities, and the priority of regular graphics can precede the priority of continuous special-shaped graphics, and the priority of continuous special-shaped graphics can precede the priority of split graphics.

[0058] It should be noted that each pair of annotation relationships can be used as an independent unit. When the overall shape of multiple pairs of annotation relationships needs to be changed, the independent unit that needs to be adjusted can be selected, and the position of the independent unit can be changed to complete the change of the overall shape of the multiple pairs of annotation relationships. In view of this, in order to simplify the algorithm and facilitate the adjustment of the overall shape of multiple pairs of annotation relationships, the display of multiple pairs of annotation relationships provided in the embodiment of the present application may include: S210, associating the port number and function in each pair of multiple pairs of annotation relationships through prefabricated symbols, and displaying the multiple pairs of annotation relationships in a selected presentation form in a concentrated array on the periphery of the target device. In this way, the port number is displayed in association with the corresponding function, so as to simplify the algorithm, facilitate the user to intuitively obtain the annotation relationship, and facilitate the switching of the overall shape of multiple pairs of annotation relationships. For example, Figure 5 , Figure 7 as well as Figure 8 The prefabricated symbol "-" is used as an example. Figure 6 The prefabricated symbol "|" is used as an example. Of course, the prefabricated symbol can also be a symbol such as "~", "_", "\" that can distinguish the port number from the function in a pair of annotation relationships.

[0059] In addition, multiple pairs of annotation relationships in multiple pairs of annotation relationships can be arranged in an order that is convenient for users to read, such as from top (bottom) to bottom (top), from left (right) to right (left), etc., in ascending or descending order of port numbers. For example: Figure 5 In the multiple pairs of annotation relationships where the device bit number is JTPM1, port number 5 is the smallest port number and is arranged on the upper left side of the multiple pairs of annotation relationships; port number 6 is the second smallest port number and is arranged on the right side of the same row as port number 5; port numbers 7 and 8 are located in the next row of port numbers 5 and 6, and port number 7 is located on the left side of port number 8.

[0060] In addition, the "frame form wrapped outside the annotation relationship" can be of the following types:

[0061] In one possible approach, reference Figure 5 and Figure 6 , the outer sides of each pair of annotation relations are wrapped by the corresponding frames. In other words, each pair of annotation relations can be set in the grid formed by the corresponding frames. The number of pairs of annotation relations is consistent with the number of frames, and multiple pairs of annotation relations can be set in the grids of multiple frames in a one-to-one correspondence. Optionally, in order to facilitate arrangement and combination, the shape of each frame can be consistent, and the shape of the frame can be a regular shape such as a rectangle, square, triangle, circle, etc. Furthermore, in order to save space, two adjacent frames can be as follows: Figure 5 and Figure 6 shown sharing the same edge.

[0062] In another possible way, refer to Figure 7 , multiple pairs of annotation relationships belonging to the same device are placed in a large frame, and the multiple pairs of annotation relationships in the large frame are arranged in an array-like manner, and two adjacent pairs of annotation relationships can be distinguished by symbols such as spaces, "," ,";" and " / ".

[0063] In yet another possible implementation, reference Figure 8 , multiple pairs of annotation relationships are arranged in an array and spaced apart. Two adjacent pairs of annotation relationships can be distinguished by symbols such as space, ",",";," / ,"|," etc., but there is no frame wrapping the outer sides of multiple pairs of annotation relationships.

[0064] The user can change the presentation form of multiple pairs of annotation relationships according to the location information of the target device; alternatively, the method provided in the embodiment of the present application can automatically match appropriate presentation forms of multiple pairs of annotation relationships according to the location information of the target device.

[0065] Among them, when the presentation form of multiple pairs of annotation relationships is changed by the user, the user selection can be obtained, and the presentation form of multiple pairs of annotation relationships can be switched or determined according to the user selection. Optionally, in order to reduce the user's trial and error and adjustment time, the method provided in the embodiment of the present application can recommend one or more suitable presentation methods of multiple pairs of annotation relationships to the user based on the location information of the target device, and the user can select the recommended presentation form according to the needs.

[0066] Whether it is to match the appropriate presentation form of multiple pairs of annotation relationships by yourself or to recommend the appropriate presentation form of multiple pairs of annotation relationships to users, it is necessary to involve the placement of multiple pairs of annotation relationships mentioned above. Specifically, multiple pairs of annotation relationships in PCB need to meet the requirements from process, production, negotiation, specifications, etc. at the same time. After abstract processing, these requirements are transformed into PCB design. The specific requirements for placing multiple pairs of annotation relationships are as follows: 1) Multiple pairs of annotation relationships are not far from the target device, because too far away is easy to cause ambiguity in identification; 2) Multiple pairs of annotation relationships can not cover the device's pads, device body, online test points, other text, and vias.

[0067] The method of finding the location for placing multiple pairs of annotation relationships on the PCB board can be:

[0068] S221, obtaining location information of the target device;

[0069] Specifically, PCB design is a kind of plane design, especially the work of placing multiple pairs of annotation relationships. In the currently completed PCB design, except for multiple pairs of annotation relationships, the positions of other objects are fixed.

[0070] The location information may include: the coordinates of the target device and the maximum projection range of the target device; in order to simplify the description, the maximum projection range of the target device may be referred to as the boundary of the target device.

[0071] Objects that have been designed and are adjacent to the target device (such as devices, vias, text, etc.) can be referred to as adjacent objects. Position information can also include: the coordinates of the object that has been designed, and the maximum projection range of the adjacent object. Among them, the adjacent object can be determined based on the coordinates of the object that has been designed and the coordinates of the target device. In order to simplify the description, the maximum projection range of the adjacent object can be referred to as the boundary of the adjacent object. The boundary of the adjacent object or the boundary of the target device may be a circle, an ellipse, a triangle, etc. In order to simplify the algorithm, all non-rectangular boundaries can be converted into the minimum rectangular boundary that can wrap the adjacent object or the target device.

[0072] In addition, the position information may also include: the minimum preset distance between multiple pairs of annotation relationships and objects, where the objects may refer to the target device and the adjacent objects. To meet the first placement requirement mentioned above. The position information may also include: the distance between the boundary of the adjacent object and the boundary of the target device. Referred to as the spacing distance. In order to simplify the calculation and speed up the program running speed, the spacing distance can be considered just above, just to the left, just below, and just to the upper right of the boundary of the target device. Of course, when judging that the target device is at the edge of the PCB based on the coordinates of the target device, the position information may also include the distance between the boundary of the target device and the boundary line of the PCB.

[0073] S222, judging whether there are positions for placing the multiple pairs of annotation relationships in the current presentation form on the periphery of the target device according to the position information of the target device and the current presentation form of the multiple pairs of annotation relationships;

[0074] Among them, in order to simplify the calculation, speed up the program running speed, and combine the actual situation of PCB design, the placement direction can be adjusted appropriately. When the overall shape of multiple pairs of annotation relationships is a regular graphic such as a strip, square, rectangle, etc. set on one side of the corresponding device, the placement direction such as the top, left, bottom, and right of the boundary of the target device can be considered; when the overall shape of multiple pairs of annotation relationships is a continuous special-shaped graphic such as L-shaped, U-shaped, Z-shaped, and ring-shaped around the corresponding device, different placement directions can be adjusted for different shapes. If the overall shape of multiple pairs of annotation relationships is L-shaped, consider the upper left, upper right, lower left, and lower right directions. When multiple pairs of annotation relationships can be split into multiple groups and multiple groups can be set around the corresponding device, two or more placement directions can be considered at the same time.

[0075] In one of the judgment methods, it can be judged whether the width of multiple pairs of annotation relationships in the current presentation form is not greater than the difference between the interval distance and twice the minimum preset distance when multiple pairs of annotation relationships in the current presentation form are placed in one or several positions, respectively, in the directions directly above, directly left, directly below, and directly right of the boundary of the target device.

[0076] As long as the width of the multiple pairs of annotation relationships of the current presentation form is greater than the difference in one of the above directions, the multiple pairs of annotation relationships of the current presentation form cannot be placed in that position. In other words, in a certain position, if the multiple pairs of annotation relationships of the current presentation form are not greater than the difference in any of the above directions, the multiple pairs of annotation relationships of the current presentation form can be placed in that position. If there is only one position in the above positions where the multiple pairs of annotation relationships of the current presentation form can be placed, it can be determined that there is a position on the periphery of the target device where the multiple pairs of annotation relationships of the current presentation form can be placed.

[0077] For example, when multiple pairs of annotation relationships of a conventional graphic are placed directly above the target device, if the width of the multiple pairs of annotation relationships in the current presentation form is 6 and the spacing distance is 8, and the minimum preset distance is 2, 8-2*2=4, 4 is less than 6, then the multiple pairs of annotation relationships in the current presentation form cannot be placed directly to the left of the boundary of the target device.

[0078] In another judgment method, the blank area on the periphery of the target device can be determined based on the position information of the target device. When multiple pairs of annotation relationships of the current presentation form are simulated and placed in one or several positions of the target device, it is determined whether the multiple pairs of annotation relationships of the current presentation form exceed the blank area. If the multiple pairs of annotation relationships of the current presentation form do not exceed the blank area in one or several positions, then there is a position for placing the multiple pairs of annotation relationships of the current presentation form in the one or several positions; if the multiple pairs of annotation relationships of the current presentation form exceed the blank area in all positions, then there is no position for placing the multiple pairs of annotation relationships of the current presentation form.

[0079] In another judgment method, multiple pairs of annotation relationships of the current presentation form are simulated and placed in one or several positions of the target device to judge whether the multiple pairs of annotation relationships of the current presentation form overlap with the boundaries of adjacent objects. If the multiple pairs of annotation relationships of the current presentation form do not overlap with the boundaries of adjacent objects or the boundaries of target objects in one or several positions, then there are positions for placing the multiple pairs of annotation relationships of the current presentation form in the one or several positions; if the multiple pairs of annotation relationships of the current presentation form overlap with the boundaries of adjacent objects or the target objects in all positions, then there are no positions for placing the multiple pairs of annotation relationships of the current presentation form.

[0080] S223, if there are positions for placing multiple pairs of annotation relationships in the current presentation form on the periphery of the target device, display the positions or display the multiple pairs of annotation relationships in the current presentation form at the positions;

[0081] Specifically, when the position is one, the position can be displayed, and the user can select multiple pairs of annotation relationships in the current presentation form to make the multiple pairs of annotation relationships active, and drag the multiple pairs of annotation relationships in the active state to the position through the mouse; or, when the position is one, the multiple pairs of annotation relationships in the current presentation form can be directly displayed at the position.

[0082] When there are multiple positions, the user can drag multiple pairs of annotation relationships in an active state and switch them between multiple positions until the user selects a satisfactory placement position; or, a switch button may be provided, and when there are multiple positions, the user can adjust the placement positions of multiple pairs of annotation relationships through the switch button; or, a priority may be preset, and the front position may be selected according to the priority. For example, the priority may be: regular graphics, initial specifications > regular graphics, small specifications > continuous special-shaped graphics, initial specifications > continuous special-shaped graphics, small specifications > split graphics, initial specifications > split graphics, small specifications. Among them, regular graphics, continuous special-shaped graphics, and split graphics refer to the overall shape of multiple pairs of annotation relationships. The initial specifications and small specifications refer to the string specifications of multiple pairs of annotation relationships. The initial specifications may indicate that the string specifications are equal to the character specifications of the position number of the designed object. The small specifications may indicate that the string specifications are slightly smaller than the character specifications of the position number of the designed object. Of course, the small size specifications may also be further subdivided. For example, Figure 5 The multiple pairs of annotation relationships for the position number JTPM1 in are shown in a conventional graphical, initial specification presentation form.

[0083] S224. If there is no position for placing multiple pairs of annotation relationships on the periphery of the target device, change the presentation form of the multiple pairs of annotation relationships until there is a position for placing multiple pairs of annotation relationships on the periphery of the target device.

[0084] Specifically, the character specifications of the character strings of multiple pairs of annotation relationships and the overall shapes of the multiple pairs of annotation relationships may have different priorities. For example, the character specifications of the character strings of multiple pairs of annotation relationships may be changed when the overall shapes of the multiple pairs of annotation relationships remain unchanged; and the overall shapes of the multiple pairs of annotation relationships may be changed when the character specifications of the character strings of the multiple pairs of annotation relationships remain unchanged. The priority of the overall shapes of the multiple pairs of annotation relationships may be higher than the priority of the character specifications of the character strings of the multiple pairs of annotation relationships. For example, the overall shapes of the multiple pairs of annotation relationships may be changed first. If all the shapes of the multiple pairs of annotation relationships are traversed and there is still no location for placing the multiple pairs of annotation relationships on the periphery of the target device, the character specifications of the character strings of the multiple pairs of annotation relationships are changed.

[0085] In addition, a switch button can be set, through which the presentation form of multiple pairs of annotation relationships can be changed. Exemplarily, the switch can be directly triggered by triggering the switch button. Among them, different switch buttons can be set for the character specifications of the string, the overall shape of multiple pairs of annotation relationships, and the form of the frame wrapped outside the annotation relationship. Another exemplary method is that a change interface can pop up after the switch button is triggered, and the character specifications of the appropriate string, the overall shape of multiple pairs of annotation relationships, and the form of the frame wrapped outside the annotation relationship can be selected or entered in the change interface to complete the switch.

[0086] In summary, the device identification method provided in the embodiment of the present application, by obtaining multiple pairs of annotation relationships of the target device and drawing a table based on the multiple pairs of annotation relationships, avoids the shortcomings of poor accuracy and long time consumption caused by manual marking, and is conducive to improving the device identification efficiency. In addition, the multiple pairs of annotation relationships of the target device are displayed in the form of multiple pairs of annotation relationships, so that the multiple pairs of annotation relationships of the target device can be concentratedly displayed in a blank area near the target device, avoiding the scattered marking of port numbers and the functions corresponding to the port numbers in a small area close to the target device, avoiding the overlapping of labels of different devices, and helping to improve the device identification efficiency.

[0087] In order to make the multiple pairs of annotation relationships more relevant to the target device, the method provided in the embodiment of the present application may optionally include: drawing leads connecting the multiple pairs of annotation relationships and the target device according to the position information of the target device. After determining the placement and presentation form of the multiple pairs of annotation relationships, the position of the leads can be determined. As long as there is a gap between the multiple pairs of annotation relationships and the target device, the leads can be added. The leads can be straight lines, or they can be Figure 5 There are generally multiple ways to present the lead, and the user can switch the way the lead is presented.

[0088] In addition, the method provided in the embodiment of the present application may also include: Figure 5 The number of bits of the target device is shown beside the multiple pairs of annotation relationships, so that the multiple pairs of annotation relationships are more relevant to the target device. The character specification of the number of bits of the target device and the character specification of the annotation relationship can be the same or different.

[0089] For Figure 5 For devices with a large number of ports, such as the device JTPM1 shown, the port number corresponding to the port can be simply indicated next to the port of the device. Specifically, the port information of the target device can be obtained, and the representative port number of the target device can be identified based on the port information of the target device, so as to reduce the space occupied by the identification and reduce the identification time.

[0090] It should be noted that it is common knowledge in the art to identify the port number near the port of the target device according to the port information. The improvement made by the embodiment of the present application is that only the representative port number of the target device needs to be identified, rather than all the port numbers of the target device. Among them, the representative port number has a representative meaning, and the user can infer the port numbers of all the ports of the target device based on the representative port number.

[0091] For example: Figure 3In the table, the representative port numbers are: port number 2, port number 19, and port number 20. The port numbers of the remaining ports can be inferred based on the arrangement order of these port numbers. For example, the port number to the right of port number 2 is 1; the ports in the previous row of port number 2 are port numbers 3 and 4, where port number 3 is on the right; the ports in the previous two rows of port number 2 are port numbers 5 and 6, where port number 5 is on the right; the ports in the next row of port numbers 19 and 20 are port numbers 17 and 18, where port number 17 is on the right.

[0092] The present application also provides a marking device 300, which can be used for a printed circuit board. Fig. 9 The identification device 300 may include an acquisition module 310 and a processing module 320. The acquisition module 310 may be used to acquire multiple pairs of annotation relationships of a target device in a printed circuit board. The annotation relationship is used to characterize the corresponding relationship between a port number and a function of the target device. The processing module 320 is used to display multiple pairs of annotation relationships.

[0093] Optionally, the acquisition module 310 may acquire the attribute information of all components of the printed circuit board. The attribute information may include the bit number of each component and multiple pairs of annotation relationships corresponding to the bit number of each component. The acquisition module 310 may also acquire the bit number of the target component. The acquisition module 310 may also filter out multiple pairs of annotation relationships corresponding to the bit number of the target component from the attribute information of all components of the printed circuit board.

[0094] In addition, the acquisition module 310 can sort the multiple pairs of annotation relationships corresponding to the bit numbers of the target device according to the size of the port numbers; and / or, the acquisition module 310 can filter out multiple pairs of annotation relationships whose functions are not null values ​​from the multiple pairs of annotation relationships corresponding to the bit numbers of the target device.

[0095] Optionally, the processing module 320 may associate the port number and the function in each pair of annotation relationships through a prefabricated symbol, and display the multiple pairs of annotation relationships in a concentrated array on the periphery of the target device in a selected presentation form.

[0096] Optionally, multiple pairs of annotation relationships have multiple presentation forms.

[0097] For example, the processing module 320 may obtain a user selection, and switch the presentation form of multiple pairs of annotation relationships or determine the presentation form of multiple pairs of annotation relationships according to the user selection.

[0098] In another exemplary embodiment, the processing module 320 may obtain the position information of the target device, and may determine whether there are positions for placing the multiple pairs of annotation relationships of the current presentation form on the periphery of the target device based on the position information of the target device and the current presentation form of the multiple pairs of annotation relationships. If there are positions for placing the multiple pairs of annotation relationships of the current presentation form on the periphery of the target device, the multiple pairs of annotation relationships of the current presentation form are displayed at the position or at the position. If there are no positions for placing the multiple pairs of annotation relationships of the current presentation form on the periphery of the target device, the presentation forms of the multiple pairs of annotation relationships are changed until there are positions for placing the multiple pairs of annotation relationships of the current presentation form on the periphery of the target device.

[0099] Optionally, any two of the multiple presentation forms differ in at least one of the following aspects: character specifications of character strings of multiple pairs of annotation relationships, overall shapes of the multiple pairs of annotation relationships, and the form of a frame wrapped outside the annotation relationships.

[0100] Optionally, multiple pairs of annotation relationships may be in an active state when selected by the user, and the multiple pairs of annotation relationships in the active state may change position as the user drags.

[0101] Optionally, the processing module 320 may draw leads connecting multiple pairs of annotation relationships and the target device according to the location information of the target device.

[0102] Optionally, the processing module 320 may obtain port information of the target device, and may identify a representative port number of the target device according to the port information of the target device.

[0103] Optionally, the processing module 320 may display the number of bits of the target device beside the multiple pairs of annotation relationships.

[0104] It should be noted that the device identification device provided in the above embodiment only uses the division of the above functional modules as an example when executing the identification method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device identification device provided in the above embodiment and the device identification method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0105] The device identification apparatus provided in the embodiment of the present application, by setting an acquisition module and a processing module, the acquisition module can obtain multiple pairs of annotation relationships of the target device, and the processing module can display multiple pairs of annotation relationships, thereby avoiding the shortcomings of poor accuracy and long time caused by manual marking, and helping to improve the device identification efficiency.

[0106] The present application embodiment also provides an electronic device 400, referring to Fig.10The electronic device 400 may include a memory 420 and a processor 410; wherein the memory 420 may store a computer program, and the computer program is suitable for being loaded by the processor 410 and executing the identification method mentioned above.

[0107] Specifically, the processor 410 and the memory 420 may be connected via a bus, and the processor 410 is also connected via the bus to an input / output interface of the electronic device 400. The memory 420 stores a PCB design program, and the input / output interface may be connected to a keyboard, an external memory, a display, etc. The PCB design drawing may be displayed on a display, or outputted via an output device such as a printer connected to the electronic device 400.

[0108] The embodiment of the present application also provides a computer-readable storage medium, which may store computer-executable instructions, and the computer-executable instructions may be executed by a processor to implement the above identification method. The specific execution process can be referred to the specific description above, and will not be repeated here.

[0109] In the above embodiments, the processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the instructions in the memory and completes the steps of the above method in combination with its hardware.

[0110] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, the functional units in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

Claims

1. A device identification method, characterized in that: The method comprises: Acquire multiple pairs of annotation relationships of target devices in a printed circuit board; the annotation relationships are used to characterize the corresponding relationship between a port number of the target device and its function; The multiple pairs of annotation relationships are displayed.

2. The method according to claim 1, characterized in that The method of obtaining multiple pairs of annotation relationships of target devices in the printed circuit board includes: Acquire attribute information of all components of the printed circuit board, wherein the attribute information includes component bit numbers and multiple pairs of annotation relationships corresponding to the component bit numbers; Obtaining the bit number of the target device; A plurality of pairs of annotation relationships corresponding to the bit numbers of the target components are selected from the attribute information of all components of the printed circuit board.

3. The method according to claim 2, characterized in that The step of obtaining multiple pairs of annotation relationships of target devices in the printed circuit board further comprises: Sort multiple pairs of annotation relationships corresponding to the bit numbers of the target device according to the size of the port numbers; And / or, from the multiple pairs of annotation relationships corresponding to the bit numbers of the target device, multiple pairs of annotation relationships whose functions are not null values ​​are screened out.

4. The method according to any one of claims 1 to 3, characterized in that: The displaying of the plurality of pairs of annotation relationships comprises: The port number and the function in each pair of the annotation relationship are associated with each other through a prefabricated symbol, and the plurality of pairs of annotation relationships are displayed in a concentrated array on the periphery of the target device in a selected presentation form.

5. The method according to claim 4, characterized in that The displaying of the plurality of pairs of annotation relationships in a selected presentation form in a concentrated array on the periphery of the target device comprises: Get user selection; The presentation form of the multiple pairs of annotation relationships is switched or the presentation form of the multiple pairs of annotation relationships is determined according to the user selection.

6. The method according to claim 4, characterized in that The displaying of the plurality of pairs of annotation relationships in a selected presentation form in a concentrated array on the periphery of the target device comprises: Acquiring location information of the target device; According to the position information of the target device and the current presentation form of the multiple pairs of annotation relationships, determining whether there are positions for placing the multiple pairs of annotation relationships in the current presentation form on the periphery of the target device; If there are positions for placing the multiple pairs of annotation relationships in the current presentation form on the periphery of the target device, the positions are displayed or the multiple pairs of annotation relationships in the current presentation form are displayed at the positions.

7. The method according to claim 6, characterized in that The displaying of the plurality of pairs of annotation relationships in a selected presentation form in a concentrated array on the periphery of the target device further comprises: If there is no location for placing the multiple pairs of annotation relationships in the current presentation form on the periphery of the target device, the presentation form of the multiple pairs of annotation relationships is changed until there is a location for placing the multiple pairs of annotation relationships in the current presentation form on the periphery of the target device.

8. The method according to any one of claims 5 to 7, characterized in that: Any two of the multiple presentation forms differ in at least one of the following aspects: character specifications of the character strings of the multiple pairs of annotation relationships, overall shapes of the multiple pairs of annotation relationships, and a frame form wrapped outside the annotation relationships.

9. The method according to any one of claims 1 to 3, characterized in that: The multiple pairs of annotation relationships are in an active state when selected by a user, and the multiple pairs of annotation relationships in the active state are used to change positions as the user drags.

10. The method according to any one of claims 1 to 3, characterized in that: Also includes: Drawing leads connecting the plurality of pairs of annotation relationships and the target device according to the position information of the target device; and / or, displaying the number of bits of the target device to the side of the plurality of pairs of annotation relationships; And / or, obtaining port information of the target device, and identifying a representative port number of the target device according to the port information of the target device.

11. A device identification device for a printed circuit board, the device comprising: An acquisition module, used for acquiring multiple pairs of annotation relationships of target devices in a printed circuit board; The annotation relationship is used to characterize the corresponding relationship between a port number of the target device and its function; A processing module is used to display the multiple pairs of annotation relationships.

12. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method as claimed in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 10 when executed by a processor.