LED element mapping relation processing method and system, computer equipment and storage medium
By automating the mapping relationship between LED components and control components, the time-consuming, labor-intensive and error-prone manual setup is resolved, achieving efficient and accurate circuit design and debugging.
Patent Information
- Application Number
- CN202510821600.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-19
AI Technical Summary
In the prior art, the mapping relationship of LED components relies on manual establishment, which is time-consuming, labor-intensive, and error-prone, affecting circuit debugging efficiency and mass production test accuracy.
By obtaining the connection information and spatial position information between the LED component identification and the control component identification, the mapping relationship between the LED component and the control component is automatically established, including parsing path information, sorting and numbering, using regular expressions to parse the file, generate the mapping relationship and output it.
It improves the efficiency of circuit design and debugging, reduces human errors, and improves the accuracy and efficiency of circuit debugging.
Smart Images

Figure CN120676494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of display technology, and in particular to a method, system, computer equipment and storage medium for processing LED element mapping relationships. Background Art
[0002] Currently, matrix control of LEDs often relies on manual mapping of component numbers to physical locations. This is particularly true when using integrated circuits to control multiple LEDs, as some LED components may be indirectly connected to the IC via a series of resistors, leading to complex mapping relationships. Traditional manual labeling or manual table lookup methods are not only time-consuming and labor-intensive, but also prone to errors, significantly impacting circuit debugging efficiency and production testing accuracy. Therefore, improvements to existing technologies are needed.
[0003] The above information is presented as background information only to assist with an understanding of the present disclosure and is not a determination or admission that any of the above may be applicable as prior art with respect to the present disclosure. Summary of the Invention
[0004] The present invention provides a method, system, computer equipment and storage medium for processing LED component mapping relationships, so as to solve the problems existing in the prior art.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A method for processing LED component mapping relationships, comprising:
[0007] Acquire a first file including connection information between LED component identifiers and control component identifiers, and a second file including spatial position information of LED components;
[0008] Extracting connection information between the LED component identifier and the control component identifier from the first file, and extracting spatial position information of the LED component from the second file;
[0009] Establishing a mapping relationship between the LED element and the control element based on the connection information and the spatial position information;
[0010] Output the mapping relationship.
[0011] Optionally, the connection information includes:
[0012] Single-level path information between the LED element and the control element; or
[0013] The LED element is connected to the multi-level path information of the control element through one or more intermediate resistance elements;
[0014] The establishing of the mapping relationship between the LED components and the control components includes: parsing the single-level path information or the multi-level path information to determine the control component pin number corresponding to each LED component.
[0015] Optionally, the spatial position information includes two-dimensional coordinates;
[0016] The establishing of a mapping relationship between the LED element and the control element based on the connection information and the spatial position information includes:
[0017] Sorting the LED components based on spatial position information of the LED components and preset sorting rules;
[0018] Assign a light zone number to each LED component based on the sorting result;
[0019] The sorting rule includes: sorting the LED elements according to a preset light zone starting angle direction and a coordinate axis sorting direction based on the spatial position information of the LED elements.
[0020] Optionally, establishing a mapping relationship between LED elements and control elements further includes:
[0021] Converting the control element pin number into an output channel number according to a preset mapping table between pin numbers and output channel numbers;
[0022] Based on the correspondence between the lamp zone numbers and the output channel numbers, a mapping relationship between the LED components and the output channels of the control components is generated.
[0023] Optionally, the sorting rule further includes a configurable origin setting parameter;
[0024] The origin setting parameter is used to indicate the starting reference position of the LED light zone number;
[0025] The sorting direction is automatically determined based on the origin setting parameters, so that the light zone number assigned to each LED component is consistent with its physical arrangement direction.
[0026] Optionally, the extraction of the connection information includes:
[0027] The component connection statements contained in the first file are parsed based on regular expressions to form the connection information.
[0028] Optionally, the method for processing LED component mapping relationships further includes:
[0029] Generate abnormal prompt information for format errors, missing data or unmapped components, and output the abnormal prompt information in the form of a graphical interface, text file or interface data.
[0030] Optionally, a system for processing LED component mapping relationships, used to implement the LED component mapping relationship processing method as described in any one of the above items, includes:
[0031] A file acquisition unit, configured to acquire a first file including connection information between the LED component identifier and the control component identifier, and a second file including spatial position information of the LED component;
[0032] a parsing unit, configured to extract connection information between the LED component identifier and the control component identifier from the first file, and to extract spatial position information of the LED component from the second file;
[0033] A mapping generation unit, configured to establish a mapping relationship between the LED elements and the control elements based on the connection information and the spatial position information;
[0034] An output unit is used to output the mapping relationship.
[0035] Optionally, the system is developed using Python language, and the file acquisition unit, parsing unit, mapping generation unit and the mapping generation unit are implemented in a functional manner.
[0036] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the LED component mapping relationship processing method as described in any one of the above items when executing the computer program.
[0037] The present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are executed by a computer processor to implement the LED component mapping relationship processing method as described in any one of the above items.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention provides an LED component mapping relationship processing method, system, computer device and storage medium, which replaces the traditional manual search method by establishing a mapping relationship between LED components and control components, effectively improving circuit design and debugging efficiency.
[0040] The present invention has other features and advantages that will be apparent from or will be described in detail in the accompanying drawings and the following detailed description incorporated herein, which together serve to explain certain principles of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 This is a flow chart of a method for processing LED component mapping relationships provided by an embodiment of the present invention;
[0043] Figure 2 It is an execution logic diagram of parsing the first file in a method for processing LED component mapping relationships provided by an embodiment of the present invention;
[0044] Figure 3 It is an execution logic diagram for parsing the second file in a method for processing LED component mapping relationships provided by an embodiment of the present invention;
[0045] Figure 4 Schematic diagram of a light board used in a method for processing LED component mapping relationships provided by an embodiment of the present invention;
[0046] Figure 5 This is a schematic diagram of the principle of sorting rules in a method for processing LED component mapping relationships provided by an embodiment of the present invention;
[0047] Figure 6 This is a flowchart of step S5 in a method for processing LED component mapping relationships provided by an embodiment of the present invention;
[0048] Figure 7 This is a structural block diagram of an LED component mapping relationship processing system provided by an embodiment of the present invention;
[0049] Figure 8 This is another structural block diagram of an LED component mapping relationship processing system provided by an embodiment of the present invention.
[0050] Reference numerals: 10, file acquisition unit; 20, parsing unit; 30, mapping generation unit; 40, output unit; 50, abnormality prompt unit. DETAILED DESCRIPTION
[0051] In order to explain in detail the possible application scenarios, technical principles, specific solutions that can be implemented, and the purpose and effects of this application, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of this application and are therefore only examples and are not intended to limit the scope of protection of this application.
[0052] References to "embodiments" herein mean that the specific features, structures, or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the word "embodiment" in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or relevance to other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the various technical features mentioned in the embodiments can be combined in any manner to form a corresponding implementable technical solution.
[0053] Unless otherwise defined, the technical terms used herein have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms herein is only for describing specific embodiments and is not intended to limit this application.
[0054] In the description of this application, the term "and / or" is used to describe a logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and both A and B exist. In addition, the character " / " in this document generally indicates that the objects before and after are in a logical "or" relationship.
[0055] In this application, terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual quantity, priority or sequence relationship between these entities or operations.
[0056] Without further limitations, in this application, the words "include", "comprise", "have" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those defined elements, but also other elements not explicitly listed, or elements inherent to such process, method or product.
[0057] Consistent with the understanding in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceed" are understood to exclude the number itself; expressions such as "above," "below," and "within" are understood to include the number itself. Furthermore, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this manner, such as "multiple groups," "multiple times," etc., unless otherwise specifically defined.
[0058] In the description of the embodiments of the present application, the space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, it should not be understood as a limitation on the embodiments of the present application.
[0059] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms "installed", "connected", "connected", "fixed", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For those skilled in the art of the present application, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0060] Please refer to Figure 1 An embodiment of the present invention provides a method for processing LED component mapping relationships, which is used to automatically establish mapping relationships between LED components and control components based on structured data during the design or production process of electronic circuits.
[0061] Specifically, the LED component mapping relationship processing method includes:
[0062] S1. Acquire a first file including connection information between LED component identifiers and control component identifiers, and a second file including spatial position information of LED components.
[0063] In an embodiment of the present invention, the processing method includes the following steps: first, obtaining a first file including connection information between LED component identifiers and control component identifiers, and a second file including spatial position information of LED components.
[0064] It is understandable that the first file records the connection relationship between each LED component and the control component. The second file records the physical coordinate information of each LED component for subsequent sorting and numbering operations.
[0065] Specifically, the first file and the second file are structured files exported or generated by circuit design related tools during the circuit design stage of the PCB; when obtaining the first file and the second file, the contents of the two files exported or generated are read from the specified path, thereby laying the foundation for subsequent operations.
[0066] For example, the first file specifically records the connection relationship between the LED component and the pin or resistor of the control chip, which can reflect which pin or resistor the lamp number is connected to, and the second file records the physical coordinates of each LED component on the PCB board.
[0067] In a possible implementation, the spatial position information includes two-dimensional coordinates.
[0068] S2. Extracting connection information between the LED component identifier and the control component identifier from the first file, and extracting spatial position information of the LED component from the second file.
[0069] In this step, the connection information between the LED components and the control components is extracted from the first file. The extraction of the connection path supports syntax matching operations based on regular expressions, and can identify the connection relationship declared in the "*SIG LED" segment or the "*SIG SSS" segment.
[0070] It should be noted that the "*SIG LED" segment and "*SIG SSS" used as examples above are located in the symbol definition file of Cadence Allegro PCB Editor (professional printed circuit board design software in the field of electronic design automation). They are the key parts of the symbol definition file used to declare the connection relationship between the symbol pin (Pin) and the logic signal (Signal) or network (Net).
[0071] In addition, this step also extracts the spatial position information of the LED component from the second file, including its two-dimensional coordinates on the PCB.
[0072] In one possible implementation, extracting the connection information includes:
[0073] The component connection statements contained in the first file are parsed based on regular expressions to form connection information.
[0074] Through Python's re module (regular expression library), component numbers and pin information can be accurately extracted, and multiple formats are supported, making it adaptable to different models of light boards.
[0075] In one possible implementation, the connection information includes:
[0076] Single-level path information between an LED element and a control element; or multi-level path information in which an LED element is connected to a control element via one or more intermediate resistor elements; the LED elements are parsed layer by layer in the order in which they are connected to determine the control element corresponding to each LED element.
[0077] It can be understood that when the connection information is single-level path information, that is, the LED element and the control element are directly connected, the LED element is set to be a D element, represented by D; the control element is set to be a U element, represented by U; then the expression of the path is D→U.
[0078] When the connection information is multi-level path information, that is, the LED element and the control element are indirectly connected through one or more resistance elements, and the resistance element is set to be an R element, represented by R; then the path expression is D→R→…→U.
[0079] Specifically, the resistor connection link can be traced layer by layer in a recursive or iterative manner to ensure that the control element pin identifier corresponding to each LED element is finally parsed.
[0080] In this embodiment, the steps performed in the process of parsing the first file are as follows: Figure 2 As shown, it includes the following processing stages:
[0081] The system reads the data line by line, determining whether the current line belongs to the "*SIG LED" segment. If so, it extracts the LED component number (D component) and reads the next line to match it with the connected resistor component (R component) or control component (U component). If the current line does not belong to the "*SIG LED" segment, it further determines whether it belongs to the "*SIGSSS" segment. If so, it extracts the connection paths between U components or between R and U components for subsequent path recovery. This branching judgment mechanism effectively separates different segment structures and constructs a complete component connection chain.
[0082] The steps performed during the parsing of the second file are as follows: Figure 3 As shown, it includes the following processing stages:
[0083] First, the text content of the second file is read line by line. For each line, an attempt is made to match the D component number with its corresponding 2D coordinate information. If a match is successful, the coordinate format is further verified to ensure compliance, such as whether it contains valid X and Y values and is numeric and correctly formatted. Once verified, the D component and its coordinate information are added to the LED component coordinate list. If a line is formatted incorrectly or no valid information can be extracted, it is skipped without affecting subsequent processing.
[0084] S3. Establish a mapping relationship between the LED components and the control components based on the connection information and the spatial position information.
[0085] Specifically, this step includes:
[0086] Parse the single-level path information or the multi-level path information to determine the control component pin number corresponding to each LED component.
[0087] In a possible implementation, in the second file, the spatial position information of the LED element includes two-dimensional coordinates (X, Y).
[0088] In the circuit design practice of existing LED light boards, there is a serious disconnect between the wiring arrangement and numbering of the LED array. Since the numbering of LED components often has no corresponding relationship with their arrangement in the physical space of the light board, the internal numbering of the LED array is chaotic and disordered.
[0089] like Figure 4 As shown in the figure, taking the origin of the light zone as an example, the set origin of the light zone 0' is not necessarily the actual origin of the light board 0. There is a deviation between the two, so it cannot be aligned with the actual wiring and light zone, which will bring a series of debugging problems. Therefore, in the actual circuit control and debugging process, if you want to achieve precise regional control, such as regional lighting, local dimming, etc., you must manually adjust the PCB design. Figure 1 1. Find the connection relationship between each LED component and its control component.
[0090] In order to solve the aforementioned problem, the embodiment of the present invention reallocates a logical number to each LED element based on the actual coordinate information of the LED element on the lamp board through specific sorting rules, so that the numbering sequence can truly reflect its physical arrangement sequence on the lamp board, thereby achieving alignment between logical control and physical arrangement, thereby improving debugging and control efficiency.
[0091] Specifically, in step S3, a mapping relationship between LED components and control components is established based on the connection information and the spatial position information, which also includes:
[0092] Sorting the LED components based on spatial position information of the LED components and preset sorting rules;
[0093] Assign a light zone number to each LED component based on the sorting result;
[0094] Convert the control element pin number to the output channel number according to a preset mapping table between the pin number and the output channel number;
[0095] Based on the correspondence between the lamp zone numbers and the output channel numbers, a mapping relationship between the LED components and the output channels of the control components is generated.
[0096] Specifically, the sorting rules include: sorting the LED components according to the preset light zone starting angle direction and coordinate axis sorting direction based on the spatial position information of the LED components.
[0097] The generation of zone numbers depends on the 2D (X, Y) coordinates of the LED components, and the specific numbering sequence is defined by sorting rules. In practice, the 2D coordinates of all LED components can be listed based on the arrangement order of the LED components on the light board. Then, the LED components are sorted and assigned zone numbers based on the set sorting rules.
[0098] In a preferred embodiment of the present invention, the sorting rule described in step S2 also includes a configurable origin setting parameter. This configured origin setting parameter is used to indicate the starting reference position for the LED light zone numbering, namely the aforementioned light zone origin 0'. Each starting reference position has a corresponding light zone starting angular direction, specifically including starting angular directions such as the upper left corner and the lower left corner. The coordinate axis sorting direction is determined based on this origin setting parameter and is reflected in ascending or descending order along the X-axis or Y-axis.
[0099] In summary, the core of the sorting rules consists of two parts:
[0100] Starting angle direction: that is, the origin direction, used to determine the starting position of the light zone number, such as the lower left corner, upper right corner, etc.
[0101] Coordinate axis sorting direction: When the starting angle direction is determined, the sorting method along the X-axis and Y-axis is increasing or decreasing according to the decision consistent with the starting angle direction when numbering from the starting angle.
[0102] In addition, the sorting rules can be set based on user input. It should be noted that the sorting rules are based on setting the origin parameter, that is, the logical origin of the light zone, and thereby determining the corresponding coordinate axis sorting direction, including ascending or descending order along the X-axis and Y-axis respectively, as the rule for assigning numbers to LED components.
[0103] For example, if the lower left corner is set as the starting corner of the lighting zone, the LED components will be sorted in ascending order of X and Y coordinates. The sorting rules can be loaded as external parameters to adapt to different LED arrangements.
[0104] In summary, in this embodiment, in order to solve the possible inconsistency problem between the set light zone numbering sequence and the actual light board wiring direction, a deviation elimination mechanism for the starting origin of the light zone numbering is introduced, and the logical starting angle of the "light zone origin 0'" is set through external input parameters, and the sorting direction is automatically adapted based on the set value to ensure that the light zone numbering is consistent with the actual arrangement.
[0105] Specifically, the ordering rules for the light zone numbers are based on the two-dimensional (X, Y) coordinates of each LED component. Different sorting directions will result in a change in the numbering order, so the actual layout of the light panel must be considered.
[0106] The light zone origin is defined as “light zone 0” below, and the sorting rules in this embodiment are described in detail.
[0107] In actual LED light panel design, the light zone numbering usually starts from a certain corner position and then increases in number in a certain direction. For example:
[0108] If light zone 0 is defined in the lower left corner, the numbers will increase from left to right, and then advance row by row from bottom to top;
[0109] If light zone 0 is in the upper right corner, the numbering should proceed from right to left and from top to bottom.
[0110] In order to adapt to different design manufacturers or layout styles, this embodiment sets four light zone starting modes, which are matched by an external input parameter value (0~3). The sorting process generally follows the following logic:
[0111] 1) First sort by the main direction of the Y coordinate (ascending or descending);
[0112] 2) In the rows with the same Y coordinate, sort them in the secondary direction of the X coordinate;
[0113] 3) The final logical numbering sequence is consistent with the actual layout direction in the light board array or display array.
[0114] It is understandable that the main direction of the X coordinate may also be used for sorting in step 1), and this sorting logic is also within the protection scope of the present invention.
[0115] In addition, if duplicate coordinates exist, they are processed in ascending order of D element numbers.
[0116] It's understood that when two or more LED components have identical spatial coordinates, their sorting priority is determined by ascending order of their D component numbers. For example, if components D002 and D003 have identical coordinates, D002, with the lower number, will be assigned the preferred zone number. This ensures unique sorting results in the event of a coordinate mismatch. Furthermore, if duplicate coordinates are detected, an exception message will be generated, prompting the user to review the design file.
[0117] For example, Figure 5 As shown in the figure, they are the corresponding light zone number matrices under different external parameter input values. The following four starting angle settings correspond to external input parameter values of 0 to 3:
[0118] Input 0: The origin of the light zone is 0' at the lower left corner, and the sorting rule is increasing along the X axis and increasing along the Y axis;
[0119] Input 1: The light zone origin 0' is located in the lower right corner, and the sorting rule is descending along the X axis and ascending along the Y axis;
[0120] Input 2: The origin of the light zone is 0' in the upper right corner, and the sorting rules are descending along the X axis and descending along the Y axis;
[0121] Input 3: The light zone origin 0' is located in the upper left corner, and the sorting rule is increasing along the X axis and decreasing along the Y axis.
[0122] It is understandable that the aforementioned sorting rules are intended to facilitate users in managing light zones, and the rules can also be formulated based on the user's habits.
[0123] Through the aforementioned deviation correction mechanism, even if the logic setting is inconsistent with the actual origin direction, the deviation can be eliminated by adjusting the sorting mode parameters, so that the LED light zone numbering has good predictability, consistency and adaptability, which facilitates the establishment of subsequent mapping relationships and control logic access.
[0124] After obtaining the corresponding control element pin identifier for each LED component, the pin number is further converted into a standardized output channel number (OUT number) using a preset mapping table. This mapping table allows for flexible switching based on control element model differences and is implemented using a key-value pair structure, enhancing the versatility of this method. For example, the control element may be an LED driver IC.
[0125] S4. Output mapping relationship.
[0126] This step outputs the mapping relationship between LED components and control components. The output format supports console display, text file storage, or interface return results to meet diverse engineering application needs.
[0127] like Figure 6 As shown, further, in this embodiment, the LED component mapping relationship processing method further includes:
[0128] S5. Generate exception prompt information for format errors, missing data or unmapped components.
[0129] This step S5 can be performed throughout any step from S1 to S4, so that the system has the ability to detect anomalies during the processing, can identify situations such as missing connection paths and incorrect coordinates, and generate corresponding error prompt information to assist users in quickly locating problems.
[0130] Specifically, the abnormal prompt information is output in the form of a graphical interface, text file or interface data.
[0131] In summary, the specific implementation process of the LED component mapping relationship processing method provided in this embodiment is as follows:
[0132] In this embodiment, two input files are first obtained, namely a first file and a second file. The first file includes connection information between LED component identifiers and control component pin identifiers, and the second file includes spatial position information of each LED component.
[0133] The first file is parsed, traversing each line. For example, the connection relationship between the LED component and the resistor component or control component pin recorded in the "*SIG LED" segment is identified. The connection path between the resistor components or between the resistor component and the control component pin in the "*SIG SSS" segment is supplemented. For multi-level resistor connections, the connection order is analyzed layer by layer, and the control component pin number corresponding to each LED component is finally extracted.
[0134] The second file is parsed to extract the two-dimensional coordinate information corresponding to each LED component identifier. Rows with abnormal formats, missing coordinates, or incorrect data are filtered to ensure the accuracy of subsequent sorting and numbering.
[0135] During the mapping process, the LED components are sorted based on the extracted spatial position information and a sorting rule. Each LED component is assigned a zone number based on the sorting result. The sorting rule includes a starting angle for the zone numbering and a coordinate axis sorting direction, which indicates the starting point and numbering direction for the LED components. The sorting direction is automatically adjusted based on different starting angle settings to ensure that the zone numbering is consistent with the actual arrangement of the LED components.
[0136] After the light zone number assignment is completed, the pin numbers of the control components are converted to standard output channel numbers based on the extracted pin numbers of the control components using a mapping table between pin numbers and output channel numbers. The mapping table supports configuration for different models of LED driver chips.
[0137] Finally, the established mapping relationship is output. The mapping result is expressed in the format of "lighting zone number: control component number. output channel number" and can be output to the console, a file, or returned as interface data. If a corresponding control path cannot be successfully established for a certain LED component, or if the spatial position information is abnormal, the output prompt "No corresponding control component found" or other error message will be displayed.
[0138] The above method can be deployed and executed on electronic devices with processing capabilities, such as embedded controllers and host computer platforms; it can also be integrated into graphical software tools or test environments for invocation. To facilitate integrated applications, the processing method can also be encapsulated as computer-readable program instructions and stored on storage media including but not limited to USB flash drives, hard drives, memory cards, and solid-state drives. When executed by a processor, the mapping relationship is constructed and output.
[0139] It can be understood that this method can be implemented on the Python platform, has the advantages of strong portability and high execution efficiency, and is suitable for the development and debugging needs of various LED control systems.
[0140] Please refer to Figure 7 Based on the above embodiments, an embodiment of the present invention provides a system for processing LED component mapping relationships, which is used to implement any of the above LED component mapping relationship processing methods, including a file acquisition unit 10, a parsing unit 20, a mapping generation unit 30 and an output unit 40.
[0141] The file acquisition unit 10 is configured to acquire a first file including connection information between LED component identifiers and control component identifiers, and a second file including spatial position information of LED components.
[0142] In one possible implementation, the first file contains circuit connection information segments, such as the "*SIG LED" segment and the "*SIG SSS" segment, which record the connection relationship between the D element and the U element or the R element; the second file records the X and Y coordinate positions of each D element, supporting flexible configuration according to the actual light board wiring method.
[0143] The parsing unit 20 is used to extract the connection information between the LED component identifier and the control component identifier from the first file, and to extract the spatial position information of the LED component from the second file. During the parsing process, the single-level path information between the LED component and the control component, or the multi-level path information in which the LED component is connected to the control component through one or more intermediate resistor elements, can be automatically identified and extracted through syntax parsing methods such as regular expressions. For a path structure with multi-level resistor elements, the connection relationship of the resistor elements can be traversed step by step until the pin number of the target U element is parsed.
[0144] The mapping generation unit 30 is used to establish a mapping relationship between LED components and control components based on the connection information and spatial position information. The physical coordinates of all LED components are first sorted, and light zone numbers are assigned based on the sorting results. The sorting rules support the combination of the starting angle direction and the coordinate axis sorting direction. Furthermore, based on a preset mapping table, the pin number of the control component is converted into a standard output channel number, thereby forming a complete mapping link from the LED light zone number to the control IC output channel.
[0145] The output unit 40 is used to output the mapping relationship. The mapping result can be output to the console, text file, or returned to the upper control system via a data interface in a format such as "lighting zone number: control element number.OUT port number".
[0146] Please refer to Figure 8 ,Further, the system also includes an exception prompt unit 50, which is used to generate exception prompt information when an exception such as format error, missing data or unmapped component occurs.
[0147] The exception prompt unit 50 has anomaly detection capabilities, identifying and prompting abnormal situations during the processing process, such as missing coordinates, disconnected connections, format errors, etc., and generating corresponding error prompt information to help users quickly locate the problem. Specifically, the exception prompt unit 50 is used to output the exception prompt information in the form of a graphical interface, text file, or interface data.
[0148] In one possible implementation, the system is developed in Python, with each unit's corresponding functional module implemented as a function, forming a modular structure with cross-platform operation and good maintainability and scalability. For example, the file acquisition function supports source input in various formats, the path parsing function supports any series of resistor intermediary structures, the mapping generation function dynamically reads configuration files to achieve compatibility with multiple IC models, and the output function supports multiple modes such as text format, JSON structure, and database writing.
[0149] The present invention also provides a computer device comprising a processor and a memory, wherein the memory stores a computer program. When executing the computer program, the processor is configured to implement the LED component mapping relationship processing method described in the embodiments. The computer device can be a host computer, an industrial controller, an embedded system, etc., and is used to perform mapping processing operations during production testing, debugging analysis, or display algorithm deployment.
[0150] The present invention also provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions implement any of the above methods for processing LED component mapping relationships. The storage medium can be a USB flash drive, SD card, SSD, server disk, etc., and can be deployed and executed in the form of a script, packaged program, or executable module.
[0151] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concepts of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of protection of this application.
Claims
1. A method for processing LED component mapping relationships, characterized in that: include: Acquire a first file including connection information between LED component identifiers and control component identifiers, and a second file including spatial position information of LED components; Extracting connection information between the LED component identifier and the control component identifier from the first file, and extracting spatial position information of the LED component from the second file; Establishing a mapping relationship between the LED element and the control element based on the connection information and the spatial position information; Output the mapping relationship.
2. The method for processing LED component mapping relationships according to claim 1, wherein: The connection information includes: Single-level path information between the LED element and the control element; or The LED element is connected to the multi-level path information of the control element through one or more intermediate resistance elements; The establishing of the mapping relationship between the LED components and the control components includes: parsing the single-level path information or the multi-level path information to determine the control component pin number corresponding to each LED component.
3. The method for processing LED component mapping relationships according to claim 2, wherein: The spatial position information includes two-dimensional coordinates; The establishing of a mapping relationship between the LED element and the control element based on the connection information and the spatial position information includes: Sorting the LED components based on spatial position information of the LED components and preset sorting rules; Assign a light zone number to each LED component based on the sorting result; The sorting rule includes: sorting the LED elements according to a preset light zone starting angle direction and a coordinate axis sorting direction based on the spatial position information of the LED elements.
4. The method for processing LED component mapping relationships according to claim 3, wherein: The establishing of the mapping relationship between the LED elements and the control elements further includes: Converting the control element pin number into an output channel number according to a preset mapping table between pin numbers and output channel numbers; Based on the correspondence between the lamp zone numbers and the output channel numbers, a mapping relationship between the LED components and the output channels of the control components is generated.
5. The method for processing LED component mapping relationships according to claim 3, wherein: The sorting rules also include configurable origin setting parameters; The origin setting parameter is used to indicate the starting reference position of the LED light zone number; The coordinate axis sorting direction is determined based on the origin setting parameter, so that the light zone number assigned to each LED component is consistent with its physical arrangement direction.
6. The method for processing LED component mapping relationships according to claim 1, wherein: The extraction of the connection information includes: The component connection statements contained in the first file are parsed based on regular expressions to form the connection information.
7. The method for processing LED component mapping relationships according to claim 1, wherein: Also includes: Generate abnormal prompt information for format errors, missing data or unmapped components, and output the abnormal prompt information in the form of a graphical interface, text file or interface data.
8. A system for processing LED component mapping relationships, characterized in that: A method for processing LED component mapping relationships according to any one of claims 1 to 7, comprising: A file acquisition unit, configured to acquire a first file including connection information between the LED component identifier and the control component identifier, and a second file including spatial position information of the LED component; a parsing unit, configured to extract spatial position information of the LED component from the first file, and to extract connection information between the LED component identifier and the control component identifier from the second file; A mapping generation unit, configured to establish a mapping relationship between the LED elements and the control elements based on the connection information and the spatial position information; An output unit is used to output the mapping relationship.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method for processing the LED component mapping relationship according to any one of claims 1 to 7 is implemented.
10. A storage medium containing computer-executable instructions, characterized in that: The computer executable instructions are executed by a computer processor to implement the LED component mapping relationship processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for analyzing and detecting open circuit and short circuit of PCB (Printed Circuit Board) design file and electronic equipment
CN113407459A
Method, device and equipment for layout mapping, medium and program product
CN116710921A
AU2011213842A1