Printed circuit board wiring method and device

By initializing the population using the Holden sequence and combining it with the sparrow search algorithm, the problem of low efficiency in finding the optimal path in PCB routing is solved, and the global routing effect is improved.

CN120745545AActive Publication Date: 2025-10-03INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202511232623.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-10-03
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

The optimization path in existing PCB wiring technology is inefficient and easily falls into local optimality while ignoring the global path, making it difficult to find a suitable path, which affects the global wiring effect.

Method used

The Holden sequence is used to initialize the population, and the sparrow search algorithm is combined for iterative calculation. By determining the coordinates of the routing start and end points, the routing optimization target is constructed, and the path is optimized to obtain the routing position with the minimum global fitness and avoid local optimal solutions.

Benefits of technology

The global search capability of PCB routing has been improved, the accuracy and efficiency of routing have been enhanced, and the appropriate routing path can be found faster and more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120745545A_ABST
    Figure CN120745545A_ABST
Patent Text Reader

Abstract

The invention discloses a printed circuit board wiring method and device, and relates to the technical field of PCB automatic wiring, and the method comprises the steps: reading the corresponding data of a printed circuit board, building a PCB wiring optimization target, and converting the PCB wiring optimization target into a sparrow search algorithm; a population is initialized through a Halton sequence, and a corresponding evaluation function is constructed and is combined with a sparrow search algorithm, so that a local extreme value is jumped out through a worst point updating strategy in a population iteration process, and a corresponding wiring path is generated and drawn, and the problems that in related technologies, the efficiency of path optimization in a PCB wiring process is relatively low, and the routing efficiency is relatively high are solved. According to the method, the technical problems that a global path is ignored due to high probability of local optimum, a proper path is difficult to find and the global wiring effect is greatly influenced in the prior art are solved, and the technical effects of performing strategy improvement on the sparrow algorithm, ensuring that the initialization of the population is more balanced and stable, effectively avoiding a local optimal solution and improving the global search capability and the wiring accuracy are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of PCB automatic wiring, and in particular to a printed circuit board wiring method and device. Background Art

[0002] Current PCB (Printed Circuit Board) automatic routing technology mainly uses traditional algorithms (such as A* search and line exploration), but has the following limitations in practical applications: 1. Resource efficiency issues: These algorithms consume a lot of memory and computing resources. Especially when dealing with highly complex PCB designs, the storage and computing overhead increases significantly, affecting overall performance.

[0003] 2. Insufficient accuracy and timeliness: When dealing with multi-layer or high-density wiring scenarios, related technologies find it difficult to quickly generate high-precision path solutions, which can easily lead to efficiency bottlenecks and extend the design cycle.

[0004] 3. Poor adaptability to complex structures: Faced with the high integration or special signal requirements (such as high speed and high frequency) of modern PCBs, the optimization capabilities of traditional algorithms are limited and it is difficult to meet the requirements of refined wiring.

[0005] In addition, related technologies can also be combined with the Sparrow algorithm for PCB routing. However, the existing method for PCB routing based on the Sparrow algorithm still has the following problems: 1. Uneven initialization: Random parameters lead to invalid search range and difficulty in finding the optimal solution; 2. Local optimal trap: Followers rely too much on the discoverer and are prone to fall into local optimality and ignore the global path.

[0006] In summary, the efficiency of finding the optimal path for PCB wiring in related technologies is low. It is easy to fall into local optimality and ignore the global path, making it difficult to find a suitable path, which greatly affects the effect of global wiring and needs to be solved urgently. Summary of the Invention

[0007] The present application provides a printed circuit board wiring method and device to at least solve the technical problems in the related art, that is, the efficiency of finding the optimal path during PCB wiring is low, it is easy to fall into the local optimum and ignore the global path, it is difficult to find a suitable path, and the global wiring effect is greatly affected.

[0008] The present application provides a printed circuit board routing method, comprising the following steps: obtaining a configuration file of a target printed circuit board, and determining the routing start point coordinates and routing end point coordinates of the target printed circuit board based on the configuration file; determining a routing optimization target corresponding to the target printed circuit board based on the routing start point coordinates and the routing end point coordinates; performing iterative calculations based on the routing optimization target and a preset Holden sequence to obtain a target routing position with the minimum global fitness, and determining a target routing path based on the target routing position, so as to route the target printed circuit board according to the target routing path.

[0009] The present application also provides a printed circuit board wiring device, including: a configuration file parsing module, used to obtain a configuration file of a target printed circuit board, and determine the wiring start point coordinates and wiring end point coordinates of the target printed circuit board based on the configuration file; an optimization target determination module, used to determine the wiring optimization target corresponding to the target printed circuit board based on the wiring start point coordinates and the wiring end point coordinates; an algorithm iteration module, used to perform iterative calculations based on the wiring optimization target and a preset Holden sequence to obtain a target wiring position with the minimum global fitness, and determine a target wiring path based on the target wiring position, so as to wire the target printed circuit board according to the target wiring path.

[0010] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned printed circuit board wiring methods when executing the computer program.

[0011] The present application also provides a non-volatile computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned printed circuit board wiring methods are implemented.

[0012] The present application also provides a computer program product, comprising a computer program, which implements the steps of any of the above-mentioned printed circuit board wiring methods when executed by a processor.

[0013] Through the present application, a configuration file of a target printed circuit board can be obtained, and the wiring start point coordinates and wiring end point coordinates of the target printed circuit board can be determined based on the configuration file; based on the wiring start point coordinates and wiring end point coordinates, a wiring optimization target corresponding to the target printed circuit board can be determined; according to the wiring optimization target and a preset Holden sequence, iterative calculation is performed to obtain a target wiring position with the minimum global fitness, and a target wiring path is determined based on the target wiring position, so that the target printed circuit board is wired according to the target wiring path. Therefore, the technical problem in the related art that the efficiency of searching for an optimal path during PCB wiring is low, it is easy to fall into a local optimum and ignore the global path, it is difficult to find a suitable path, and the global wiring effect is greatly affected can be solved. The technical effect of ensuring that the initialization of the population is more balanced and stable by improving the strategy of the sparrow algorithm, effectively avoiding local optimal solutions, improving the global search capability, and thus being able to more efficiently search for a suitable wiring path and improving the accuracy of wiring can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 any creative work.

[0015] Figure 1 A flowchart of a printed circuit board wiring method provided according to an embodiment of the present application; Figure 2 A schematic diagram of the execution logic of a sparrow search algorithm model provided for one embodiment of the present application; Figure 3 A schematic diagram of execution logic of a printed circuit board wiring method provided in one embodiment of the present application; Figure 4 A schematic diagram of the execution logic of a sparrow search algorithm model integrating a Holden sequence provided in one embodiment of the present application; Figure 5 This is an example diagram of a printed circuit board wiring device according to an embodiment of the present application.

[0016] Among them, 10 is a printed circuit board wiring device, 100 is a configuration file parsing module, 200 is an optimization target determination module, and 300 is an algorithm iteration module. DETAILED DESCRIPTION

[0017] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0018] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0019] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0020] In conjunction with the specific application environment architecture or the specific hardware architecture on which the execution of the printed circuit board wiring method depends, the specific application environment architecture or the specific hardware architecture is described herein.

[0021] An embodiment of the present application provides a printed circuit board wiring method.

[0022] like Figure 1 FIG. 1 is a flow chart of a printed circuit board wiring method according to an embodiment of the present application, wherein the printed circuit board wiring method includes the following steps: In step S101 , a configuration file of a target printed circuit board is obtained, and the coordinates of a wiring start point and a wiring end point of the target printed circuit board are determined based on the configuration file.

[0023] The embodiment of the present application can first extract the wiring parameter information in the PCB configuration file to determine the starting position coordinates and the ending position coordinates of the PCB wiring according to the wiring parameter information.

[0024] Therefore, the embodiments of the present application achieve rapid coordinate positioning through standardized parsing operations, improve wiring efficiency and accuracy, and provide accurate starting and ending point data for subsequent automatic wiring.

[0025] Optionally, in one embodiment of the present application, a configuration file of a target printed circuit board is obtained, and the wiring start point coordinates and the wiring end point coordinates of the target printed circuit board are determined based on the configuration file, including: reading the configuration file through the wiring system of the target printed circuit board, and parsing the component information in the configuration file to obtain the coordinated component information; obtaining the wiring design requirements of the target printed circuit board, and determining the wiring start point coordinates and the wiring end point coordinates based on the wiring design requirements and the coordinated component information.

[0026] It should be noted that the embodiment of the present application can first load the PCB configuration file (such as a design file in JSON (JavaScript Object Notation) format) and extract the component layout data therein, including the type, size and initial coordinate position of the component.

[0027] Secondly, the embodiment of the present application can parse the component layout data, and convert the parsed data into coordinate component information, that is, the precise position of each component (such as the coordinates of resistor R1 are (10mm, 15mm)).

[0028] Again, the embodiment of the present application can obtain the design requirements of the PCB (such as electrical connection rules, signal priority, etc.), and combine it with the coordinate component information to determine the component pairs that need to be connected; for example, pin A of chip U1 needs to be connected to the positive pole of capacitor C1, etc.

[0029] Afterwards, the embodiment of the present application can calculate the starting point coordinates and end point coordinates of the optimal wiring path based on the physical position of the components to automatically avoid other components or prohibited areas, and can verify the rationality of the coordinates through design rule checks to ensure that there are no short circuits or spacing violations.

[0030] Therefore, the embodiments of the present application can automate parsing and coordinate generation to reduce human errors, and integrate design rule checking, effectively improving wiring efficiency, avoiding electrical conflicts, and supporting multiple design requirements, and can be well applied to complex PCB layouts.

[0031] As an achievable method, the specific process of determining the coordinates of the wiring start point and the wiring end point in the embodiment of the present application is as follows: 1. Requirements analysis and constraint extraction: 1) Obtain PCB wiring design requirements, including electrical characteristics requirements, signal transmission priority and impedance matching conditions; 2) Analyze the coordinate component information and extract the physical location and connection relationship of key components.

[0032] 2. Intelligent start and end point decision-making: 1) Based on signal flow analysis, determine the transmission direction of the critical path and prioritize the endpoints of the shortest electrical path as candidate coordinates; 2) Combine thermal distribution analysis and electromagnetic compatibility assessment to screen the optimal starting and end point combination.

[0033] 3. Dynamic coordinate optimization: 1) Use graph theory algorithms to construct component connection topology diagrams, and use the shortest path algorithm to correct the coordinates of the starting and ending points; 2) Introduce an obstacle avoidance mechanism to ensure that the start and end point coordinates do not conflict with the existing layout.

[0034] 4. Output and verification: 1) Generate a set of start and end point coordinates and verify their rationality through simulation tools; 2) Output the final coordinates to the routing optimization system.

[0035] It should be noted that in the process of determining the above-mentioned starting and ending points, the embodiment of the present application also needs to establish a signal criticality scoring model, give priority to selecting the endpoints of high-priority signals as starting and ending points, and train the prediction model in combination with historical wiring data to obtain the potential optimal starting and ending point combination.

[0036] Furthermore, in an embodiment of the present application, the above-mentioned dynamic coordinate optimization adopts a multi-objective trade-off strategy to simultaneously optimize path length, signal delay, and manufacturing cost.

[0037] Therefore, the embodiment of the present application is based on real-time layout adjustment of start and end points, can be compatible with high-density and complex design scenarios, and breaks through the inherent mode of traditional manual specification of start and end points. It can automatically determine the optimal coordinates through multi-dimensional analysis, thereby improving the reliability of PCB wiring.

[0038] In step S102, a routing optimization target corresponding to the target printed circuit board is determined based on the routing start point coordinates and the routing end point coordinates.

[0039] Furthermore, after the PCB is coordinate-ized using routing software and the routing start point coordinates and routing end point coordinates of the PCB are determined, the embodiment of the present application can construct a routing optimization target corresponding to the PCB based on the routing start point coordinates and routing end point coordinates, thereby providing reliable data support for the subsequent construction of a sparrow search algorithm (i.e., a sparrow search algorithm model) applied in the PCB routing scenario.

[0040] In step S103, an iterative calculation is performed based on the routing optimization target and the preset Holden sequence to obtain a target routing position with the minimum global fitness, and a target routing path is determined based on the target routing position to route the target printed circuit board according to the target routing path.

[0041] In actual implementation, those skilled in the art may, on the premise of determining the coordinates of the starting point and the end point of the routing, perform fitness iterative calculations in combination with the Holden sequence during the PCB routing process using the sparrow search algorithm.

[0042] During the iterative calculation process, the embodiment of the present application can determine whether the fitness iterative calculation operation of the sparrow search algorithm model meets the iteration end requirements, so as to terminate the fitness iterative calculation operation when the fitness iterative calculation operation meets the iteration end requirements, thereby obtaining the target wiring position with the minimum global fitness, and determining a target wiring path with a path length as short as possible based on the target wiring position, while avoiding obstacles such as components in the PCB, so as to wire the printed circuit board according to the target wiring path.

[0043] Therefore, the embodiment of the present application optimizes the PCB wiring path through the sparrow search algorithm combined with the Holden sequence, so that it can intelligently judge the iteration termination condition, quickly lock the global optimal path, avoid invalid iterations, and significantly improve the efficiency and reliability of PCB wiring path design.

[0044] Optionally, in one embodiment of the present application, an iterative calculation is performed according to a wiring optimization target and a preset Holden sequence to obtain a target wiring position with the minimum global fitness, including: establishing a corresponding sparrow search algorithm model according to the wiring optimization target, and determining a population initial value and an evaluation function of the sparrow search algorithm model based on the wiring optimization target and the preset Holden sequence; performing a fitness iterative calculation operation based on the sparrow search algorithm model and in combination with the population initial value and the evaluation function to obtain a first target individual with the maximum fitness and a second target individual with the minimum fitness in each iteration process, and determining a global minimum fitness individual based on the first target individual and the second target individual, and updating the second target individual through the global minimum fitness individual; judging whether the fitness iterative calculation operation meets a preset iteration end requirement, wherein if the fitness iterative calculation operation meets the iteration end requirement, the fitness iterative calculation operation is terminated to obtain a target wiring position with the minimum global fitness.

[0045] Those skilled in the art should understand that the sparrow search algorithm is a tightly coupled optimization algorithm. The foraging process is divided into two behavioral strategies: finder and follower. The finder is the leader of the group and has a wider search range than other individuals. Its role is to guide other individuals in the group to find food and provide the best location. The process of finding the best location is to find the optimal path for wiring on the PCB. The algorithm outputs the final connected path.

[0046] Furthermore, there are many components and some no-routing areas on the PCB. Routing must avoid these obstacles and avoid intersections with no-routing areas. Therefore, automatic routing is constrained by factors such as the shortest routing path and obstacle avoidance. These are also factors that need to be considered when optimizing routing paths using the sparrow search algorithm.

[0047] However, the sparrow search algorithm model also has defects. When the sparrow search algorithm model is used to route the PCB, the routing success rate is low. The specific defects are as follows: 1. The initial population distribution is uneven. The finder usually changes the search range through a random parameter. When the optimization problem is relatively simple, this search method is prone to invalid search problems, making it difficult to achieve the optimal solution for the wiring result.

[0048] Followers, on the other hand, update their own state based on the information of the discoverer (coordinate location, number of discoverers). They tend to move in the direction indicated by the discoverer in the hope of finding a better solution. When the discoverer is stuck in a local optimum, the followers, relying on the discoverer's information, are likely to follow it into this local optimum, causing the entire group to linger in the local area and struggle to break out and explore a wider search space. In this case, due to its excessive dependence on the current discoverer's state, the autonomy of the sparrow search algorithm model is limited, resulting in the routing path being confined to local selection and ignoring the global optimal path.

[0049] Based on the above problems, the embodiment of the present application can improve the strategy of the sparrow search algorithm model to ensure that the initialization of the population is more balanced and stable, solve the problem of local optimal solution, and thus be more conducive to the realization of global automatic wiring of PCB.

[0050] Specifically, when constructing a wiring optimization target corresponding to a PCB based on the wiring start point coordinates and the wiring end point coordinates, the embodiment of the present application can abstract the wiring optimization problem (i.e., the wiring optimization target) into a sparrow search algorithm model, so as to seek the optimal solution for connecting two points within a certain range of plane space through the sparrow search algorithm model; secondly, in order to solve the problem that the sparrow search algorithm model uses a random function to randomly initialize the population, the population obtained by overemphasizing the randomness of the population and cannot ensure that all coordinate points are evenly distributed within the PCB board, and to better control the individuals in the initial population, the embodiment of the present application can use a Halton sequence to generate uniformly distributed random numbers to initialize the population, so as to improve the richness of the individuals in the population.

[0051] Furthermore, this embodiment of the application also requires determining an evaluation function for the sparrow search algorithm model to calculate the fitness value of each sparrow (i.e., path). The sparrows in the population are ranked based on this fitness value to select the optimal path. In this embodiment of the application, the evaluation function for PCB routing primarily includes two criteria: the length of the routing path and whether there is a collision with an obstacle.

[0052] Afterwards, after each population iteration through the sparrow search algorithm model, the embodiment of the present application can calculate the best and worst points in the PCB population according to the population calculation formula, and use the corresponding change strategy (such as the worst point update strategy) to change the worst point position to generate a new path position, thereby increasing the algorithm's ability to jump out of the local optimum.

[0053] Therefore, the embodiment of the present application constructs the wiring optimization target through the wiring start point coordinates and the wiring end point coordinates, and introduces the sparrow search algorithm to realize intelligent optimization, so that the optimal wiring solution can be quickly locked, the number of iterations can be reduced, and it can be applicable to complex wiring scenarios of high-density PCBs; in addition, the embodiment of the present application uses the Halton sequence to initialize the population and combines it with the sparrow search algorithm model to better control the initial population individuals, accelerate the individual search for the location of high-quality solutions, and improve the speed and accuracy of algorithm convergence.

[0054] During actual execution, the embodiment of the present application can determine whether the fitness iterative calculation operation meets the iteration end requirements (such as the fitness value reaches the optimal solution range or reaches the maximum number of iterations).

[0055] If the iteration end requirements are met, the embodiment of the present application can output the final target wiring position (i.e., the key coordinate points of the optimal wiring path) and call the drawing software (such as AutoCAD, Altium Designer) to automatically generate a wiring path diagram for use in PCB production.

[0056] If the iteration end requirement is not met, the embodiment of the present application may continue to execute the sparrow search algorithm to enter the next round of iteration and adjust the PCB wiring path.

[0057] Therefore, the embodiments of the present application can generate standard wiring files through drawing software, seamlessly connecting the manufacturing process, thereby greatly improving the efficiency and accuracy of PCB wiring.

[0058] Optionally, in one embodiment of the present application, a corresponding sparrow search algorithm model is established according to the wiring optimization target, including: establishing a corresponding physical space mathematical model and wiring constraints based on the wiring start point coordinates and the wiring end point coordinates, so as to construct an initial wiring space model according to the physical space mathematical model and the wiring constraints; determining the electrical characteristic requirements of the target printed circuit board, and constructing a multi-objective optimization function according to the electrical characteristic requirements and the initial wiring space model; and establishing a sparrow search algorithm model based on the initial wiring space model and the multi-objective optimization function.

[0059] In the specific implementation process, the embodiment of the present application constructs the wiring optimization target of the PCB and establishes the specific process of the sparrow search algorithm model based on the wiring optimization target as follows: 1. Get the starting and ending coordinates of the PCB wiring and establish the initial wiring space model: 1) Basic data preparation: By obtaining the coordinates of the PCB routing start and end points, a mathematical model of the physical space is established to provide the search space boundary for subsequent optimization; 2) Constraint determination: The coordinate information implies the physical limitations that the routing path must comply with (such as board margins, fixed component positions, etc.).

[0060] Therefore, the embodiment of the present application can provide a geometric constraint basis for subsequent multi-objective optimization, and at the same time define the range of feasible solutions for the algorithm search of the sparrow search algorithm model.

[0061] 2. According to the electrical characteristics requirements of the circuit board, a multi-objective optimization function is constructed, which comprehensively considers the path length, signal integrity and electromagnetic compatibility indicators. Among them, the multi-objective optimization function can adopt a weighted fusion method, and the weight of each sub-objective can be dynamically adjusted according to the signal type: 1) Optimization target quantification: Convert electrical characteristics (signal integrity, EMC (Electromagnetic Compatibility)) and engineering requirements (such as path length) into mathematical expressions to form computable evaluation criteria; 2) Dynamic weighting mechanism: The weights of each sub-goal are adjusted in real time based on the signal type (e.g., high-speed signals must prioritize latency, power signals must reduce noise), reflecting design priorities.

[0062] It should be noted that the embodiment of the present application can calculate the path length in the multi-objective optimization function based on the spatial relationship between the starting point and the end point; in addition, the sparrow search algorithm model of the embodiment of the present application also needs to iteratively optimize the multi-objective optimization function to generate a feasible solution.

[0063] 3. Design an adaptive sparrow search algorithm model: 1) Automatically adjust the population size and number of iterations based on routing complexity to ensure that the search capability matches the problem difficulty; 2) A dynamic discoverer-sensor ratio allocation mechanism is used to balance global exploration and local development capabilities; 3) Introduce obstacle avoidance operator to enhance path feasibility.

[0064] Therefore, the embodiments of the present application can break away from the limitations of fixed parameters of traditional algorithms through operations such as intelligent parameter adjustment and multi-objective collaborative optimization, and can simultaneously meet the requirements of electrical performance and geometric constraints.

[0065] Optionally, in one embodiment of the present application, after establishing a corresponding sparrow search algorithm model according to the wiring optimization target, it also includes: obtaining the wiring parameters of the target printed circuit board in the configuration file; based on the wiring parameters and the wiring optimization target, determining multiple model parameters of the sparrow search algorithm model, wherein the multiple model parameters include population size, discoverer ratio, alerter ratio, objective function dimension, limit range and maximum number of iterations.

[0066] It should be noted that the embodiment of the present application can associate the initialization parameters required by the sparrow search algorithm model with the automatic routing parameters, and combine them with the routing optimization goals to further clarify the various model parameters of the sparrow search algorithm model. These various model parameters include the population size (i.e., the number of paths connecting the starting point and the end point, which can be set to 100), the dimension of the population (i.e., the dimension of the objective function, the embodiment of the present application only considers the PCB routing on the same layer, so it can be set to 2), the limit range (i.e., the search space boundary, which is expressed as the maximum value of the X-axis and Y-axis coordinates of the PCB path point in the embodiment of the present application, which can be set to [0, 100]), the discoverer ratio (which can be set to 0.7), the alerter ratio (which can be set to 0.2), and the maximum number of iterations (which can be set to 100).

[0067] Therefore, the embodiment of the present application analyzes PCB wiring parameters and optimization goals, dynamically configures key parameters of the sparrow search algorithm (such as population size, discoverer ratio, etc.), thereby realizing intelligent wiring optimization and being able to adaptively match different wiring scenarios, effectively improving convergence efficiency.

[0068] As an achievable approach, the present embodiment of the present application can first extract PCB routing parameters from a configuration file, including line width constraints, inter-layer via restrictions, and obstacle distribution data. Secondly, the present embodiment of the present application can establish a multi-objective optimization function based on the routing optimization goal to comprehensively consider path length, signal integrity, and manufacturing cost factors. After that, the present embodiment of the present application can use an adaptive mechanism to dynamically configure multiple model parameters corresponding to the sparrow search algorithm model. The setting strategy for each model parameter is as follows: 1. Automatically adjust the population size in various model parameters based on wiring complexity, and use large population search in high-density areas; 2. Intelligently allocate the ratio of discoverers to alerters based on obstacle distribution density; 3. Determine the objective function dimension based on the number of wiring layers and the number of key nodes; 4. Set the limit range based on the actual size of the PCB and the safety distance; 5. Use the convergence speed monitoring mechanism to dynamically adjust the maximum number of iterations.

[0069] It should be noted that the execution process of the adaptive mechanism in the embodiment of the present application mainly includes the following steps: 1. Establish a parameter prediction model and use historical wiring data to predict the optimal initial parameter combination; 2. Monitor the fitness change rate in real time and dynamically adjust the algorithm exploration and development capabilities.

[0070] In the actual execution process, the above multi-objective optimization function can adopt a weighted summation method, and the weight of each sub-objective can be dynamically adjusted according to the routing priority.

[0071] Therefore, the embodiments of the present application introduce an adaptive parameter configuration mechanism into the sparrow search algorithm model, thereby breaking away from the limitations of traditional manual parameter adjustment, improving the applicability of the algorithm, and automatically adjusting the exploration and development strategies according to the wiring process, while optimizing electrical performance and geometric constraint indicators.

[0072] Optionally, in one embodiment of the present application, based on the wiring optimization target and the preset Holden sequence, the population initial value and evaluation function of the sparrow search algorithm model are determined, including: randomly selecting at least one prime number, and determining the cardinality of the Holden sequence based on the at least one prime number, and initializing the sequence length and number of iterations of the Holden sequence; based on the initialized sequence length and number of iterations, and in combination with the cardinality, iteratively performing a sequence accumulation operation to generate sequence elements of the Holden sequence, and determining the population initial value of the sparrow search algorithm model based on the sequence elements.

[0073] It should be noted that the specific steps of initializing population data using the Halton sequence in the embodiment of the present application are as follows: 1. Cardinality selection: One or more prime numbers are selected as the bases of the Halton sequence. Since PCB wiring is performed in a two-dimensional plane, the two bases in the embodiment of the present application can be selected as 2 and 3. 2. Initialization: Set the starting point of the Holden sequence (0,0), initialize the sequence length and number of iterations of the Holden sequence; 3. Generate sequence elements: Generates sequence elements of a Holton sequence by performing an iterative calculation using a selected base w , and then determine the population initial value of the sparrow search algorithm model according to the sequence element, the sequence element w The calculation formula is as follows:

[0074] in, Represents the cardinality, used for iterative calculation to generate sequence elements w The base value of ; w is any integer greater than 1; Represents the coefficient, in the iterative calculation w When , as the coefficients of different power terms, participate in the construction w The numerical value of {0,1,… }( i =0,1,… m ).

[0075] Therefore, the embodiment of the present application uses the Halton sequence to initialize the population and combines it with the sparrow search algorithm model, thereby improving the efficiency of internal work communication in the population, avoiding the random and complex calculation process of the population, improving the algorithm's optimization efficiency and optimization performance, and can accurately and quickly seek the optimal value. It can also quickly locate the population of regional classification in the PCB, optimize the selection of the population in the sparrow search algorithm model, and improve the efficiency of PCB wiring.

[0076] Optionally, in one embodiment of the present application, based on the wiring optimization target and the preset Holden sequence, the population initial value and evaluation function of the sparrow search algorithm model are determined, and the method further includes: constructing a wiring path length function corresponding to the target printed circuit board based on the wiring start point coordinates and the wiring end point coordinates; determining the position of the obstacle in the target printed circuit board, and calculating the collision coefficient between the obstacle in the target printed circuit board and the wiring path of the target printed circuit board according to the obstacle position, so as to construct a corresponding collision function based on the collision coefficient; calculating the product of the wiring path length function and the collision coefficient to obtain the corresponding product function, and calculating the sum of the product function and the wiring path length function to generate an evaluation function.

[0077] As an achievable method, the embodiment of the present application can construct an evaluation function of the sparrow search algorithm model based on the shortest PCB wiring distance and obstacle avoidance requirements. The specific process is as follows: 1. Taking the length of the wiring path as the standard function (i.e., the wiring path length function), its mathematical expression is:

[0078] in, L Indicates the length of the wiring path; , For path x Axis and y axis coordinates; n Indicates the path is n coordinate points.

[0079] 2. Calculate the collision coefficient M between the current routing path and the obstacle on the PCB, and then construct the corresponding collision function. If the current routing path does not intersect with the obstacle on the PCB, the M value is 0; if they do intersect, M>0, and gradually eliminate them during iteration to retain the optimal routing route.

[0080] 3. The integrated wiring path length function and collision function are used to determine the final evaluation function through the following formula: F=L+L·M Where F represents the evaluation function.

[0081] Therefore, the embodiments of the present application construct an evaluation function by combining the wiring path length and the obstacle collision coefficient, thereby balancing the shortest path and obstacle avoidance requirements, improving wiring reliability, and quantifying the evaluation criteria through mathematical modeling, which facilitates automatic optimization of PCB wiring design and can be well applied to intelligent wiring scenarios such as complex circuit boards.

[0082] Optionally, in one embodiment of the present application, based on the sparrow search algorithm model, and in combination with the population initial value and the evaluation function, a fitness iterative calculation operation is performed to obtain the first target individual with the largest fitness and the second target individual with the smallest fitness in each iteration process, and the global minimum fitness individual is determined based on the first target individual and the second target individual, and the second target individual is updated by the global minimum fitness individual, including: based on the sparrow search algorithm model, performing a fitness iterative calculation operation to calculate the fitness corresponding to the corresponding individuals in the population initial value through the evaluation function in each iteration process, and determine the first target individual with the largest fitness and the second target individual with the smallest fitness in each iteration process; calculating the midpoint position corresponding to the first target individual and the second target individual, and calculating the position difference between the midpoint position and the second target individual; calculating the reflection product between the position difference and a preset reflection coefficient, and calculating the sum of the reflection product and the midpoint position to obtain the corresponding reflection point; calculating the fitness corresponding to the reflection point, and comparing the fitness of the reflection point, the first target individual, and the second target individual to obtain a corresponding comparison result, and determining the global minimum fitness individual according to the comparison result, and updating the second target individual by the global minimum fitness individual.

[0083] It should be noted that the embodiment of the present application is based on the population initial value and the constructed evaluation function, and introduces the sparrow search algorithm code to perform iterative fitness calculation, and performs strategy calculation on the fitness optimal point and fitness worst point appearing in each iteration process to re-determine the global fitness worst point. The specific calculation process is as follows: 1. In each iteration, the fitness of each individual in the population initial value is calculated through the evaluation function, and the first target individual with the largest fitness in each iteration is determined. (i.e. the optimal individual of the sparrow population) and the second target individual with the smallest fitness (i.e. the worst individual in the sparrow population), its corresponding fitness value is F( ) and F( ); 2. Calculate the midpoint between the best point (i.e. the best individual) and the worst point (i.e. the worst individual) as ; 3. Based on the midpoint position and the worst individual, calculate the reflection point using the following formula : = + ( - ) in, is the reflection coefficient, and its value range is ; 4. Calculate the fitness corresponding to the reflection point, and compare the fitness of the reflection point, the best point and the worst point to obtain the corresponding comparison results, and determine the individual with the minimum global fitness based on the comparison results, so as to update the worst point through the individual with the minimum global fitness.

[0084] Therefore, the embodiment of the present application initializes the population through the Halton sequence and integrates the sparrow search algorithm model, so that PCB automated wiring can be realized simply, quickly and accurately; in addition, the embodiment of the present application improves the algorithm's ability to escape local extreme values ​​through a special strategy during the population iteration process (i.e., continuously updating the worst point during the iteration process), further ensuring the diversity of the population and solving the problem of falling into the local optimal solution in the sparrow search algorithm.

[0085] Optionally, in one embodiment of the present application, the fitness of the reflection point, the first target individual, and the second target individual are compared to obtain corresponding comparison results, and the global fitness minimum individual is determined according to the comparison results, so as to update the second target individual through the global fitness minimum individual, including: when the fitness of the reflection point is less than the fitness of the first target individual, based on the reflection point, the midpoint position and the preset expansion coefficient, the corresponding first expansion point is calculated, and it is determined whether the fitness of the first expansion point is less than the fitness of the first target individual, wherein if the fitness of the first expansion point is less than the fitness of the first target individual, the second target individual is updated through the first expansion point, otherwise the second target individual is updated using the reflection point; when the fitness of the reflection point is greater than the fitness of the second target individual, based on the second target The method comprises the following steps: calculating a corresponding second expansion point based on the first target individual, the midpoint position, and the preset compression coefficient, and determining whether the fitness of the second expansion point is less than the fitness of the second target individual. If the fitness of the second expansion point is less than the fitness of the second target individual, the second target individual is updated through the second expansion point. When the fitness of the reflection point is greater than the fitness of the first target individual and the fitness of the reflection point is less than the fitness of the second target individual, calculating a corresponding third expansion point based on the second target individual, the midpoint position, and the compression coefficient, and determining whether the fitness of the third expansion point is less than the fitness of the second target individual. If the fitness of the third expansion point is less than the fitness of the second target individual, the second target individual is updated through the third expansion point. Otherwise, the second target individual is updated using the reflection point.

[0086] In the actual implementation process, the embodiment of the present application can compare the fitness of the reflection point, the best point and the worst point, and perform the corresponding worst point update operation according to the corresponding comparison results, as described below: 1. If the fitness of the reflection point F( ) is less than the fitness of the optimal point F( ), then the expansion operation is performed by the following formula to obtain the first expansion point : = + ( - ) in, is the expansion coefficient, which is usually set to 2.

[0087] 1) Determine whether the fitness of the first expansion point is less than the fitness of the optimal point; 2) If the fitness of the first expansion point F( ) is less than the fitness of the optimal point F( ), then the first expansion point As the individual with the minimum global fitness, it passes the first expansion point Update the worst point Otherwise, the reflection point As the individual with the minimum global fitness, to utilize the reflection point Update the worst point .

[0088] 2. If the worst point fitness F( ) is less than the fitness of the reflection point F( ), then the compression operation is performed by the following formula to obtain the second expansion point : = + ( - ) in, is the compression coefficient, usually set to 0.5.

[0089] 1) Determine whether the fitness of the second expansion point is less than the fitness of the worst point; 2) If the fitness of the second expansion point F( ) is less than the fitness of the worst point F( ), then the second expansion point As the individual with the minimum global fitness, to utilize the second expansion point Update the worst point .

[0090] 3. If the fitness of the optimal point F( ) is less than the fitness of the reflection point F( ), and the fitness of the reflection point F( ) is less than the fitness of the worst point F( ), then the embodiment of the present application can perform compression operation by the following formula to obtain the third expansion point : = - ( - ) in, is the compression coefficient, usually set to 0.5.

[0091] 1) Determine whether the fitness of the third expansion point is less than the fitness of the worst point; 2) If the fitness of the third expansion point F( ) is less than the fitness of the worst point F( ), then the third expansion point As the individual with the minimum global fitness, to utilize the third expansion point Update the worst point Otherwise, the reflection point As the individual with the minimum global fitness, passing through the reflection point Update instead of the worst point .

[0092] 4. By performing the above worst point update operation, the global worst point is obtained, and the position of the individual sparrow is recalculated according to the global worst point, so as to search for the optimal route.

[0093] Therefore, the embodiments of the present application determine the individual with the minimum global fitness during each fitness iteration to update the worst point of the current iteration, thereby effectively avoiding local optimal solutions, improving global search capabilities, and searching for reliable PCB wiring paths more efficiently and accurately. Optionally, in one embodiment of the present application, a target wiring path is determined based on a target wiring position so as to route a target printed circuit board according to the target wiring path, including: performing trajectory discretization processing on the target wiring position with the minimum global fitness, extracting corresponding key nodes, and constructing a node coordinate matrix based on the key nodes; constructing a corresponding initial path network based on the node coordinate matrix, and configuring path parameters according to the initial path network and the wiring optimization target; determining the plate characteristics of the target printed circuit board, and constructing a parameterized target wiring path based on the plate characteristics, path parameters and a preset dynamic rule adaptation mechanism; simulating and verifying the target wiring path to obtain corresponding simulation results, and correcting the target wiring path based on the simulation results to generate a final wiring path; converting the final wiring path into wiring path information in a target format so as to route the target printed circuit board according to the wiring path information in the target format.

[0094] In the specific implementation process, the PCB wiring path determination and wiring process based on the target wiring position in the embodiment of the present application are as follows: Step 1: Discretize the trajectory of the target wiring position with the minimum global fitness, extract key nodes (including starting point, end point, inter-layer transition candidate points, and critical refuge points in the forbidden area), and generate a node coordinate matrix; Step 2: Construct an initial path network based on the node coordinate matrix and configure path parameters based on the routing optimization goals: set impedance matching segments (length is 1 / 4 of the signal wavelength) for areas sensitive to signal interference, set a minimum bending radius (e.g., no less than 3 times the line width) for high-density component areas, and configure via apertures for cross-layer paths (matching line width and inter-layer distance). Step 3: Introduce a dynamic rule adaptation mechanism to adjust the line width tolerance (±5%) based on the target PCB board characteristics (such as high-frequency materials), add shielding layer identification based on the signal frequency (high frequency not less than 1GHz), and form a parameterized target wiring path; Step 4: Simulate and verify the target wiring path. Use electromagnetic compatibility simulation to detect the signal crosstalk value (required to be no greater than -30dB). Use voltage drop simulation to verify the current carrying capacity of the power path (satisfy 1.2 times the maximum current redundancy). Step 5: Modify the path based on the simulation results: increase the isolation spacing (by at least twice the line width) for line segments with excessive crosstalk, and widen the line width (by 20%) for power paths with insufficient current carrying capacity. Generate the final wiring path. Step 6: Convert the final routing path into G code recognizable by the wiring machine, including the tool speed (dynamically adjusted with the line width, no more than 50mm / s for wide lines and no more than 80mm / s for thin lines), layer change instruction timing, and control the wiring machine to complete the PCB physical routing.

[0095] It's important to note that in the above process, step 1 lays the foundation for path refinement by extracting key nodes; step 2 configures core parameters based on optimization goals, balancing signal quality and process feasibility; step 3 dynamically adapts the path to different board materials and signal characteristics; steps 4-5 use simulation verification and correction to proactively mitigate actual routing risks; and step 6 achieves precise conversion of the path to processing instructions. The overall process, from digital paths to physical routing, is logically coherent, creatively integrating path parameterization with process rules to enhance routing reliability.

[0096] Therefore, the embodiments of the present application adapt to different wiring requirements through path parameterization and use simulation verification to avoid risks in advance, making the physical wiring instructions more accurate and improving PCB wiring quality and production efficiency.

[0097] In addition, in the specific implementation process, the embodiment of the present application can also determine the location of PCB vias and add vias to the path to determine the optimal PCB wiring solution through a three-dimensional search path. The specific process is as follows: 1. 3D spatial modeling: Convert the PCB multi-layer structure into a three-dimensional grid, using vias as vertical connection nodes, and coordinately optimize with the planar wiring path; 2. Dynamic via insertion: Real-time evaluation of via locations during path search, taking into account via impedance, inter-layer crosstalk, and thermal effects, automatically selecting the via coordinates with the best electrical performance. 3. Multi-objective trade-off: Combine signal integrity and manufacturing cost (such as minimizing the number of vias) to generate a globally optimal three-dimensional wiring solution.

[0098] Therefore, the embodiment of the present application optimizes the PCB via layout by adopting a three-dimensional path search method, thereby improving the quality of high-frequency signal transmission, reducing via-related losses, supporting high-density interconnection design, improving via utilization, and being compatible with a variety of complex PCB wiring scenarios.

[0099] Optionally, in one embodiment of the present application, after the target printed circuit board is wired according to the target wiring path, the method further includes: obtaining actual wiring data of the target printed circuit board after wiring is completed, wherein the actual wiring data includes geometric parameters, electrical parameters and actual fitness values ​​of the actual wiring path, and the electrical parameters include signal delay and crosstalk values; calculating a wiring accuracy comprehensive index based on the actual wiring data and the preset target parameters and target fitness values ​​of the target wiring path, the wiring accuracy comprehensive index including geometric fit, electrical parameter compliance rate and fitness deviation rate; judging whether the wiring accuracy comprehensive index reaches a preset threshold; if the wiring accuracy comprehensive index does not reach the preset threshold, optimizing a pre-constructed sparrow search algorithm model based on the geometric fit and fitness deviation rate, and adjusting the step size parameter of the Holden sequence based on the electrical parameter compliance rate, so as to re-iterate the calculation based on the optimized sparrow search algorithm model and the adjusted step size parameter of the Holden sequence; if the wiring accuracy comprehensive index reaches the preset threshold, storing the actual wiring data as a reference wiring template.

[0100] It should be noted that, after the wiring is completed, the specific process of evaluating and optimizing the PCB wiring accuracy in the embodiment of the present application is as follows: Step 1: Obtain the actual wiring data of the target printed circuit board after wiring is completed according to the target wiring path, wherein the actual wiring data includes the geometric parameters, electrical parameters and corresponding actual fitness values ​​of the actual wiring path. The geometric parameters include the path length and the number of corners, and the electrical parameters include the signal delay and crosstalk value. Step 2: Calculate the wiring accuracy comprehensive index based on the actual wiring data and the target parameters and target fitness values ​​of the target wiring path. The wiring accuracy comprehensive index includes the geometric fit between the actual path and the target path, the electrical parameter compliance rate, and the fitness deviation rate. These three indicators can be combined into a quantitative index (i.e., the wiring accuracy comprehensive index) using preset weights. Step 3: If the comprehensive routing accuracy index does not reach the preset threshold, the local search factor of the sparrow search algorithm is adjusted according to the direction of the geometric fit deviation, the step size parameter of the Holden sequence is adjusted according to the electrical parameter compliance rate, and the routing iterative calculation is re-executed; if the comprehensive routing accuracy index reaches the preset threshold, the current routing parameters and algorithm configuration are stored as a reference template.

[0101] It can be understood that the embodiments of the present application calculate the wiring accuracy comprehensive indicators including geometric fit, electrical parameter compliance rate, and fitness deviation rate by comparing the actual wiring data with the target parameters, and adjust the local search factor of the sparrow search algorithm and the step size parameter of the Holden sequence in a targeted manner according to whether the corresponding indicators meet the standards, so as to achieve iterative optimization of the wiring results or algorithms.

[0102] Therefore, the embodiments of the present application achieve quantitative evaluation of PCB wiring accuracy by evaluating and optimizing PCB wiring accuracy, and form closed-loop optimization by targeted adjustment of algorithm parameters, thereby improving wiring accuracy and algorithm adaptability, reducing manual intervention, and improving the reliability and efficiency of PCB wiring.

[0103] Optionally, in one embodiment of the present application, a comprehensive wiring accuracy index is calculated based on the target parameters and target fitness values ​​of the actual wiring data and the preset target wiring path. The comprehensive wiring accuracy index includes geometric fit, electrical parameter compliance rate and fitness deviation rate, including: calculating the spatial distance deviation, relative length deviation and corner number difference between the actual wiring data and the target wiring path, and performing a normalized weighted sum operation on the spatial distance deviation, relative length deviation and corner number difference to obtain geometric fit; calculating the first wiring ratio whose signal delay is within a preset error range and the second wiring ratio whose crosstalk value is lower than a preset crosstalk value threshold, and calculating the product of the first wiring ratio and the second wiring ratio to obtain the electrical parameter compliance rate; calculating the absolute value of the difference between the actual fitness value and the target fitness value, and calculating the ratio between the absolute value of the difference and the target fitness value to determine the fitness deviation rate based on the ratio.

[0104] During the actual implementation process, the geometric fit in the embodiments of the present application can be determined by the normalized weighted sum of the spatial distance deviation, relative length deviation and number of corner differences between the actual wiring path and the target wiring path; the electrical parameter compliance rate can be determined by the product of the wiring proportion in which the actual signal delay error is within the allowable range and the wiring proportion in which the actual crosstalk value is lower than the threshold; the fitness deviation rate is determined by the ratio of the absolute difference between the actual fitness value and the target fitness value to the target fitness value.

[0105] Therefore, the embodiments of the present application refine the indicator calculation through normalized weighting, proportional product, etc., enhance the accuracy and consistency of PCB wiring evaluation, provide a more reliable basis for adjusting algorithm parameters, and ensure the accuracy of the model optimization direction.

[0106] The following describes the execution logic of the sparrow search algorithm model of the present application in conjunction with the accompanying drawings.

[0107] Figure 2 This is a schematic diagram of the execution logic of the sparrow search algorithm model of this application. Figure 2 As shown, the execution process of the sparrow search algorithm model of this application is as follows: S201: Initialization of sparrow search algorithm parameters; S202: Establish a feasible solution to the problem; S203: Dynamically update feasible data; S204: Determine whether the updated feasible data meets the population iteration end requirement. If the updated feasible data meets the population iteration end requirement, go to S205; otherwise, go to S201. S205: End iteration.

[0108] The following describes the execution logic of the printed circuit board wiring method of the present application in conjunction with the accompanying drawings.

[0109] Figure 3 This is a schematic diagram of the execution logic of the printed circuit board wiring method of this application. Figure 3 As shown, the execution process of the printed circuit board wiring method of the present application is as follows: S301: parsing component information in the printed circuit board configuration file and converting it into coordinates; S302: Establishing a wiring optimization target for a printed circuit board and converting it into a corresponding sparrow search algorithm model; S303: Using the Holden sequence to determine the population initial value and evaluation function of the sparrow search algorithm model; S304: Calculate the worst value of the evaluation function using the sparrow search algorithm model; S305: recalculating the worst value during each population iteration; S306: After the population iteration of the sparrow search algorithm model is completed, the optimal wiring path is output and the optimal wiring path is drawn using drawing software.

[0110] The following describes the execution logic of the sparrow search algorithm model (i.e., sparrow search optimization algorithm model) integrated with the Holden sequence of the present application with reference to the accompanying drawings.

[0111] Figure 4 This is a schematic diagram of the execution logic of the sparrow search algorithm model that integrates the Holden sequence of this application. Figure 4 As shown, the execution process of the sparrow search algorithm model (i.e., sparrow search optimization algorithm model) integrated with the Holden sequence of the present application is as follows: S401: Start the wiring software; S402: Initialize wiring parameters; S403: Calculate population distribution nodes using Holden sequence; S404: Initialize the comfort level of the sparrow search algorithm model; S405: Determine whether the population iteration process of the sparrow search algorithm model has reached the maximum number of iterations or the optimal solution range. If the population iteration process has reached the maximum number of iterations or the optimal solution range, go to S406; otherwise, go to S407. S406: Output the optimal sparrow position; S407: Calculate the optimal solution (i.e., the best point) and the worst solution (i.e., the worst point); S408: updating the global worst solution in each population iteration process; S409: Update the sparrow position and go to S405.

[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0113] An embodiment of the present application also provides a printed circuit board wiring device.

[0114] like Figure 5 As shown, the printed circuit board wiring device 10 includes: a configuration file parsing module 100 , an optimization target determination module 200 and an algorithm iteration module 300 .

[0115] The configuration file parsing module 100 is used to obtain the configuration file of the target printed circuit board and determine the wiring start point coordinates and the wiring end point coordinates of the target printed circuit board based on the configuration file.

[0116] The optimization target determination module 200 is used to determine the routing optimization target corresponding to the target printed circuit board based on the routing start point coordinates and the routing end point coordinates.

[0117] The algorithm iteration module 300 is used to perform iterative calculations based on the routing optimization target and the preset Holden sequence to obtain a target routing position with the minimum global fitness, and to determine a target routing path based on the target routing position so as to route the target printed circuit board according to the target routing path.

[0118] Optionally, in one embodiment of the present application, the configuration file parsing module 100 includes: a coordinate unit and a determination unit.

[0119] The coordinate unit is used to read the configuration file through the wiring system of the target printed circuit board and parse the component information in the configuration file to obtain the coordinate component information.

[0120] The determination unit is used to obtain the wiring design requirements of the target printed circuit board, and determine the wiring start point coordinates and the wiring end point coordinates based on the wiring design requirements and the coordinate component information.

[0121] Optionally, in one embodiment of the present application, the algorithm iteration module 300 includes: an algorithm construction unit, an iterative calculation unit and a judgment unit.

[0122] Among them, the algorithm construction unit is used to establish a corresponding sparrow search algorithm model according to the wiring optimization target, and determine the population initial value and evaluation function of the sparrow search algorithm model based on the wiring optimization target and the preset Holden sequence.

[0123] The iterative calculation unit is used to perform fitness iterative calculation operations based on the sparrow search algorithm model and in combination with the population initial value and the evaluation function to obtain the first target individual with the largest fitness and the second target individual with the smallest fitness in each iteration process, and determine the global minimum fitness individual based on the first target individual and the second target individual, and update the second target individual through the global minimum fitness individual.

[0124] The judgment unit is used to judge whether the fitness iterative calculation operation meets the preset iteration end requirement, wherein if the fitness iterative calculation operation meets the iteration end requirement, the fitness iterative calculation operation is terminated to obtain the target wiring position with the minimum global fitness.

[0125] Optionally, in one embodiment of the present application, the algorithm construction unit includes: an initialization subunit and an accumulation subunit.

[0126] The initialization subunit is used to randomly select at least one prime number, determine the cardinality of the Holden sequence according to the at least one prime number, and initialize the sequence length and number of iterations of the Holden sequence.

[0127] The accumulation subunit is used to iteratively perform sequence accumulation operations based on the initialized sequence length and the number of iterations, in combination with the cardinality, to generate sequence elements of the Holden sequence, and to determine the population initial value of the sparrow search algorithm model according to the sequence elements.

[0128] Optionally, in one embodiment of the present application, the algorithm construction unit further includes: a construction subunit, a first calculation subunit and a second calculation subunit.

[0129] The construction subunit is used to construct a wiring path length function corresponding to the target printed circuit board based on the wiring start point coordinates and the wiring end point coordinates.

[0130] The first calculation subunit is used to determine the position of the obstacle in the target printed circuit board, and calculate the collision coefficient between the obstacle in the target printed circuit board and the wiring path of the target printed circuit board according to the obstacle position, so as to construct a corresponding collision function based on the collision coefficient.

[0131] The second calculation subunit is configured to calculate the product of the wiring path length function and the collision coefficient to obtain a corresponding product function, and calculate the sum of the product function and the wiring path length function to generate an evaluation function.

[0132] Optionally, in one embodiment of the present application, the iterative calculation unit includes: an execution subunit, a third calculation subunit, a fourth calculation subunit and a comparison subunit.

[0133] Among them, the execution subunit is used to perform fitness iterative calculation operations based on the sparrow search algorithm model, so as to calculate the fitness corresponding to the corresponding individuals in the initial value of the population through the evaluation function in each iteration process, and determine the first target individual with the largest fitness and the second target individual with the smallest fitness in each iteration process.

[0134] The third calculation subunit is used to calculate the midpoint position corresponding to the first target individual and the second target individual, and calculate the position difference between the midpoint position and the second target individual.

[0135] The fourth calculation subunit is configured to calculate a reflection product between the position difference and a preset reflection coefficient, and to calculate the sum of the reflection product and the midpoint position to obtain a corresponding reflection point.

[0136] The comparison subunit is used to calculate the fitness corresponding to the reflection point, and compare the fitness of the reflection point, the first target individual and the second target individual to obtain the corresponding comparison result, and determine the individual with the minimum global fitness based on the comparison result, so as to update the second target individual through the individual with the minimum global fitness.

[0137] Optionally, in one embodiment of the present application, the comparison subunit includes: a first updating subunit, a second updating subunit and a third updating subunit.

[0138] Among them, the first updating subunit is used to calculate the corresponding first expansion point based on the reflection point, the midpoint position and the preset expansion coefficient when the fitness of the reflection point is less than the fitness of the first target individual, and determine whether the fitness of the first expansion point is less than the fitness of the first target individual. If the fitness of the first expansion point is less than the fitness of the first target individual, the second target individual is updated through the first expansion point; otherwise, the second target individual is updated using the reflection point.

[0139] The second updating subunit is used to calculate the corresponding second expansion point based on the second target individual, the midpoint position and the preset compression coefficient when the fitness of the reflection point is greater than the fitness of the second target individual, and to determine whether the fitness of the second expansion point is less than the fitness of the second target individual, wherein if the fitness of the second expansion point is less than the fitness of the second target individual, the second target individual is updated through the second expansion point.

[0140] The third updating subunit is used to calculate the corresponding third expansion point based on the second target individual, the midpoint position and the compression coefficient when the fitness of the reflection point is greater than the fitness of the first target individual and the fitness of the reflection point is less than the fitness of the second target individual, and to determine whether the fitness of the third expansion point is less than the fitness of the second target individual. If the fitness of the third expansion point is less than the fitness of the second target individual, the second target individual is updated using the third expansion point; otherwise, the second target individual is updated using the reflection point.

[0141] Optionally, in one embodiment of the present application, the printed circuit board wiring device 10 further includes: an acquisition module and a parameter setting module.

[0142] The acquisition module is used to acquire the wiring parameters of the target printed circuit board in the configuration file after establishing a corresponding sparrow search algorithm model according to the wiring optimization target.

[0143] The parameter setting module is used to determine various model parameters of the sparrow search algorithm model based on the wiring parameters and the wiring optimization goals. The various model parameters include population size, discoverer ratio, vigilant ratio, objective function dimension, boundary range and maximum number of iterations.

[0144] Optionally, in one embodiment of the present application, the algorithm construction unit includes: a first establishment unit, a first determination unit and a second establishment unit.

[0145] The first establishing unit is used to establish a corresponding physical space mathematical model and wiring constraints based on the wiring start point coordinates and the wiring end point coordinates, so as to construct an initial wiring space model according to the physical space mathematical model and the wiring constraints.

[0146] The first determining unit is used to determine the electrical characteristic requirements of the target printed circuit board and construct a multi-objective optimization function according to the electrical characteristic requirements and the initial wiring space model.

[0147] The second establishing unit is used to establish a sparrow search algorithm model based on the initial wiring space model and the multi-objective optimization function.

[0148] Optionally, in one embodiment of the present application, the printed circuit board wiring device 10 further includes: a wiring data acquisition module, a comprehensive index calculation module, an index analysis module, a model optimization module and a template storage module.

[0149] Among them, the wiring data acquisition module is used to obtain the actual wiring data of the target printed circuit board after the target printed circuit board is wired according to the target wiring path, wherein the actual wiring data includes the geometric parameters, electrical parameters and actual fitness values ​​of the actual wiring path, and the electrical parameters include signal delay and crosstalk values.

[0150] The comprehensive index calculation module is used to calculate the comprehensive index of wiring accuracy based on the actual wiring data and the target parameters and target fitness values ​​of the preset target wiring path, wherein the comprehensive index of wiring accuracy includes geometric conformity, electrical parameter compliance rate and fitness deviation rate.

[0151] The indicator analysis module is used to determine whether the comprehensive indicator of wiring accuracy reaches a preset threshold.

[0152] The model optimization module is used to optimize the pre-built sparrow search algorithm model according to the geometric fit and fitness deviation rate if the comprehensive index of wiring accuracy does not reach the preset threshold, and adjust the step size parameter of the Holden sequence according to the electrical parameter compliance rate, so as to re-iterate the calculation based on the optimized sparrow search algorithm model and the adjusted step size parameter of the Holden sequence.

[0153] The template storage module is used to store the actual wiring data as a reference wiring template if the comprehensive wiring accuracy index reaches a preset threshold.

[0154] Optionally, in one embodiment of the present application, the comprehensive index calculation module includes: a degree of fit calculation unit, a compliance rate calculation unit, and a deviation rate calculation unit.

[0155] Among them, the degree of fit calculation unit is used to calculate the spatial distance deviation, relative length deviation and corner number difference between the actual wiring data and the target wiring path, and perform a normalized weighted sum operation on the spatial distance deviation, relative length deviation and corner number difference to obtain the geometric degree of fit.

[0156] The compliance rate calculation unit is used to calculate the first wiring ratio whose signal delay is within a preset error range and the second wiring ratio whose crosstalk value is lower than a preset crosstalk value threshold, and calculate the product of the first wiring ratio and the second wiring ratio to obtain the electrical parameter compliance rate.

[0157] The deviation rate calculation unit is used to calculate the absolute value of the difference between the actual fitness value and the target fitness value, and calculate the ratio between the absolute value of the difference and the target fitness value to determine the fitness deviation rate according to the ratio.

[0158] Optionally, in one embodiment of the present application, the algorithm iteration module 300 includes: a discretization unit, a parameter optimization unit, a second determination unit, a simulation verification unit, and a format conversion unit.

[0159] The discretization unit is used to discretize the trajectory of the target wiring position with the minimum global fitness, extract the corresponding key nodes, and construct a node coordinate matrix based on the key nodes.

[0160] The parameter optimization unit is used to construct a corresponding initial path network based on the node coordinate matrix, and configure path parameters according to the initial path network and the routing optimization target.

[0161] The second determining unit is used to determine the plate characteristics of the target printed circuit board and construct a parameterized target routing path according to the plate characteristics, path parameters and a preset dynamic rule adaptation mechanism.

[0162] The simulation verification unit is used to simulate and verify the target wiring path to obtain corresponding simulation results, and to correct the target wiring path according to the simulation results to generate a final wiring path.

[0163] The format conversion unit is used to convert the final wiring path into wiring path information in a target format, so as to perform wiring on the target printed circuit board according to the wiring path information in the target format.

[0164] The description of the features in the embodiment corresponding to the printed circuit board wiring device can refer to the relevant description of the embodiment corresponding to the printed circuit board wiring method, and will not be repeated here.

[0165] 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 processor is configured to run the computer program to execute the steps in any of the above-mentioned printed circuit board wiring method embodiments.

[0166] An embodiment of the present application further provides a non-volatile computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned printed circuit board wiring method embodiments when running.

[0167] In an exemplary embodiment, the non-volatile computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0168] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned printed circuit board wiring method embodiments are implemented.

[0169] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned printed circuit board wiring method embodiments are implemented.

[0170] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0171] The above describes in detail the printed circuit board wiring method, apparatus, device, and medium provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of this application. The description of the above embodiments is intended only to facilitate understanding of the method and core concepts of this application. It should be noted that those skilled in the art may, without departing from the principles of this application, make various improvements and modifications to this application, and such improvements and modifications fall within the scope of protection of the claims of this application.

Claims

1. A printed circuit board wiring method, characterized in that: The following steps are involved: Obtaining a configuration file of a target printed circuit board, and determining the wiring start point coordinates and the wiring end point coordinates of the target printed circuit board based on the configuration file; Determining a wiring optimization target corresponding to the target printed circuit board based on the wiring start point coordinates and the wiring end point coordinates; An iterative calculation is performed according to the wiring optimization target and a preset Holden sequence to obtain a target wiring position with the minimum global fitness, and a target wiring path is determined according to the target wiring position to route the target printed circuit board according to the target wiring path.

2. The printed circuit board wiring method according to claim 1, wherein: The step of obtaining a configuration file of a target printed circuit board and determining the wiring start point coordinates and the wiring end point coordinates of the target printed circuit board based on the configuration file includes: Reading the configuration file through the wiring system of the target printed circuit board and parsing the component information in the configuration file to obtain the coordinate component information; A wiring design requirement of the target printed circuit board is obtained, and based on the wiring design requirement and the coordinate component information, the wiring start point coordinates and the wiring end point coordinates are determined.

3. The method according to claim 1, characterized in that The iterative calculation is performed according to the wiring optimization target and the preset Holden sequence to obtain the target wiring position with the minimum global fitness, including: Establishing a corresponding sparrow search algorithm model according to the wiring optimization target, and determining a population initial value and an evaluation function of the sparrow search algorithm model based on the wiring optimization target and a preset Holden sequence; Based on the sparrow search algorithm model, and in combination with the population initial value and the evaluation function, perform an iterative fitness calculation operation to obtain a first target individual with the maximum fitness and a second target individual with the minimum fitness in each iteration process, and determine a global minimum fitness individual based on the first target individual and the second target individual, and update the second target individual using the global minimum fitness individual; It is determined whether the fitness iterative calculation operation meets a preset iteration end requirement, wherein if the fitness iterative calculation operation meets the iteration end requirement, the fitness iterative calculation operation is terminated to obtain a target wiring position with the minimum global fitness.

4. The printed circuit board wiring method according to claim 3, wherein: The determining of the population initial value and evaluation function of the sparrow search algorithm model based on the wiring optimization target and the preset Holden sequence includes: Randomly selecting at least one prime number, determining the cardinality of the Holden sequence according to the at least one prime number, and initializing the sequence length and number of iterations of the Holden sequence; Based on the initialized sequence length and the number of iterations, and in combination with the cardinality, a sequence accumulation operation is iteratively performed to generate sequence elements of the Holden sequence, and a population initial value of the sparrow search algorithm model is determined according to the sequence elements.

5. The printed circuit board wiring method according to claim 3, wherein: The method of determining the population initial value and evaluation function of the sparrow search algorithm model based on the wiring optimization target and the preset Holden sequence further includes: Constructing a wiring path length function corresponding to the target printed circuit board based on the wiring start point coordinates and the wiring end point coordinates; Determining a position of an obstacle in the target printed circuit board, and calculating a collision coefficient between the obstacle in the target printed circuit board and a wiring path of the target printed circuit board according to the position of the obstacle, so as to construct a corresponding collision function based on the collision coefficient; The product of the wiring path length function and the collision coefficient is calculated to obtain a corresponding product function, and the sum of the product function and the wiring path length function is calculated to generate the evaluation function.

6. The printed circuit board wiring method according to claim 3, wherein: The method includes performing an iterative fitness calculation operation based on the sparrow search algorithm model and in combination with the population initial value and the evaluation function to obtain a first target individual with the maximum fitness and a second target individual with the minimum fitness in each iteration process, and determining a global minimum fitness individual based on the first target individual and the second target individual, and updating the second target individual through the global minimum fitness individual, including: Based on the sparrow search algorithm model, performing an iterative fitness calculation operation to calculate the fitness of corresponding individuals in the population initial value through the evaluation function in each iteration process, and determining a first target individual with the maximum fitness and a second target individual with the minimum fitness in each iteration process; Calculating the midpoint position corresponding to the first target individual and the second target individual, and calculating the position difference between the midpoint position and the position of the second target individual; Calculating a reflection product between the position difference and a preset reflection coefficient, and calculating the sum of the reflection product and the midpoint position to obtain a corresponding reflection point; Calculate the fitness corresponding to the reflection point, and compare the fitness of the reflection point, the first target individual, and the second target individual to obtain a corresponding comparison result, and determine the global fitness minimum individual according to the comparison result, so as to update the second target individual through the global fitness minimum individual.

7. The printed circuit board wiring method according to claim 6, wherein: The comparing the fitness of the reflection point, the first target individual, and the second target individual to obtain a corresponding comparison result, and determining the individual with the minimum global fitness according to the comparison result, so as to update the second target individual by using the individual with the minimum global fitness, includes: When the fitness of the reflection point is less than the fitness of the first target individual, a corresponding first expansion point is calculated based on the reflection point, the midpoint position, and a preset expansion coefficient, and it is determined whether the fitness of the first expansion point is less than the fitness of the first target individual. If the fitness of the first expansion point is less than the fitness of the first target individual, the second target individual is updated using the first expansion point; otherwise, the second target individual is updated using the reflection point. When the fitness of the reflection point is greater than the fitness of the second target individual, calculating a corresponding second expansion point based on the second target individual, the midpoint position, and a preset compression coefficient, and determining whether the fitness of the second expansion point is less than the fitness of the second target individual, wherein if the fitness of the second expansion point is less than the fitness of the second target individual, updating the second target individual using the second expansion point; When the fitness of the reflection point is greater than the fitness of the first target individual and the fitness of the reflection point is less than the fitness of the second target individual, a corresponding third expansion point is calculated based on the second target individual, the midpoint position, and the compression coefficient, and it is determined whether the fitness of the third expansion point is less than the fitness of the second target individual. If the fitness of the third expansion point is less than the fitness of the second target individual, the second target individual is updated using the third expansion point; otherwise, the second target individual is updated using the reflection point.

8. The printed circuit board wiring method according to claim 3, wherein: After establishing a corresponding sparrow search algorithm model according to the wiring optimization target, the method further includes: Obtaining wiring parameters of the target printed circuit board in the configuration file; Based on the wiring parameters and the wiring optimization target, multiple model parameters of the sparrow search algorithm model are determined, wherein the multiple model parameters include population size, discoverer ratio, vigilant ratio, objective function dimension, limit range and maximum number of iterations.

9. The printed circuit board wiring method according to claim 3, wherein: The step of establishing a corresponding sparrow search algorithm model according to the wiring optimization target includes: Based on the wiring start point coordinates and the wiring end point coordinates, establishing a corresponding physical space mathematical model and wiring constraint conditions, so as to construct an initial wiring space model according to the physical space mathematical model and the wiring constraint conditions; Determining electrical characteristic requirements of the target printed circuit board, and constructing a multi-objective optimization function based on the electrical characteristic requirements and the initial wiring space model; The sparrow search algorithm model is established based on the initial wiring space model and the multi-objective optimization function.

10. The printed circuit board wiring method according to claim 1, wherein: After routing the target printed circuit board according to the target routing path, the method further includes: Acquiring actual wiring data of the target printed circuit board after wiring is completed, wherein the actual wiring data includes geometric parameters, electrical parameters, and actual fitness values ​​of the actual wiring path, and the electrical parameters include signal delay and crosstalk values; Calculating a wiring accuracy comprehensive index based on the actual wiring data and the target parameters and target fitness value of the preset target wiring path, wherein the wiring accuracy comprehensive index includes geometric conformity, electrical parameter compliance rate, and fitness deviation rate; Determining whether the wiring accuracy comprehensive index reaches a preset threshold; If the wiring accuracy comprehensive index does not reach the preset threshold, optimizing the pre-built sparrow search algorithm model according to the geometric fit and the fitness deviation rate, and adjusting the step size parameter of the Holden sequence according to the electrical parameter compliance rate, so as to re-perform iterative calculation according to the optimized sparrow search algorithm model and the adjusted step size parameter of the Holden sequence; If the wiring accuracy comprehensive index reaches the preset threshold, the actual wiring data is stored as a reference wiring template.

11. The printed circuit board wiring method according to claim 10, wherein: The calculation of the wiring accuracy comprehensive index based on the actual wiring data and the target parameters and target fitness value of the preset target wiring path includes geometric conformity, electrical parameter compliance rate and fitness deviation rate, including: Calculating the spatial distance deviation, relative length deviation, and corner number difference between the actual wiring data and the target wiring path, and performing a normalized weighted sum operation on the spatial distance deviation, the relative length deviation, and the corner number difference to obtain the geometric fit; Calculating a first wiring ratio whose signal delay is within a preset error range and a second wiring ratio whose crosstalk value is lower than a preset crosstalk value threshold, and calculating a product of the first wiring ratio and the second wiring ratio to obtain the electrical parameter compliance rate; An absolute value of a difference between the actual fitness value and the target fitness value is calculated, and a ratio between the absolute value of the difference and the target fitness value is calculated to determine the fitness deviation rate according to the ratio.

12. The printed circuit board wiring method according to claim 1, wherein: The step of determining a target wiring path according to the target wiring position so as to perform wiring on the target printed circuit board according to the target wiring path includes: Performing trajectory discretization processing on the target wiring position with the minimum global fitness, extracting the corresponding key nodes, and constructing a node coordinate matrix based on the key nodes; Based on the node coordinate matrix, construct a corresponding initial path network, and configure path parameters according to the initial path network and the routing optimization target; Determining the plate characteristics of the target printed circuit board, and constructing a parameterized target routing path based on the plate characteristics, the path parameters, and a preset dynamic rule adaptation mechanism; Performing simulation verification on the target wiring path to obtain corresponding simulation results, and correcting the target wiring path according to the simulation results to generate a final wiring path; The final routing path is converted into routing path information in a target format, so as to perform routing on the target printed circuit board according to the routing path information in the target format.

13. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the printed circuit board wiring method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the printed circuit board wiring method according to any one of claims 1 to 12.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the printed circuit board wiring method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Wiring method, system and device and storage medium

    CN118862813A

  • Obstacle-avoiding wiring method, device and equipment and circuit board wiring method

    CN119485932A

  • Unmanned aerial vehicle three-dimensional path planning method for improving dung beetle algorithm

    CN119512156A

  • Plane mechanical arm trajectory planning method and system for stamping production line and medium

    CN120480927A

Cited By

  • Wiring method of printed circuit board and electronic equipment

    CN121093892A

  • Circuit board typesetting method and device, electronic equipment, storage medium and product

    CN121842985A