Printed circuit board wiring method and apparatus

By combining the Holden sequence initialization population and the sparrow search algorithm, the problem of low efficiency in finding optimal paths in PCB routing is solved, and the global search capability and routing path accuracy are improved.

CN120745545BActive Publication Date: 2025-11-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Current PCB routing technologies have low efficiency in finding optimal paths, are prone to getting stuck in local optima and ignoring global paths, making it difficult to find suitable paths and affecting the overall routing effect.

Method used

The population is initialized using the Holden sequence and iteratively calculated using the sparrow search algorithm. Through Holden combinatorial optimization, the routing optimization target is determined by acquiring the target. The starting and ending coordinates of the routing on the target printed circuit board are determined by acquiring the target, and the routing optimization target is constructed. The target routing position with the minimum global fitness is obtained by iterative calculation using the Holden sequence, and the target routing path is determined based on the target routing position.

Benefits of technology

It improves the global search capability of PCB routing, avoids local optima, and enhances the accuracy and efficiency of routing, enabling it to find suitable routing paths faster and more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120745545B_ABST
    Figure CN120745545B_ABST
Patent Text Reader

Abstract

The application discloses a printed circuit board wiring method and device, relates to the technical field of PCB automatic wiring, and comprises the following steps: reading corresponding data of a printed circuit board, establishing a PCB wiring optimization target, and converting into a sparrow search algorithm; a population is initialized through a Halton sequence, a corresponding evaluation function is constructed, and the sparrow search algorithm is combined, so that a local extreme value is jumped out in a population iteration process through a worst point updating strategy, a corresponding wiring path is generated and drawn, and the technical problem that in the related art, the efficiency of an optimization path in a PCB wiring process is low, a global path is easily ignored due to falling into a local optimal solution, a suitable path is difficult to find, and the global wiring effect is greatly affected is solved, the sparrow algorithm is improved in strategy, the initialization of the population is more balanced and stable, a local optimal solution is effectively avoided, the global search capability and the accuracy of wiring are improved, and the technical effects 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 particularly relates to a printed circuit board wiring method and device. BACKGROUND

[0002] Current PCB (Printed Circuit Board) automatic wiring technology mainly adopts traditional algorithms (such as A* search method and line exploration method), but in actual application, the following limitations mainly exist:

[0003] 1. Resource efficiency problem: These algorithms consume a large amount of memory and computing resources, especially when dealing with high complexity PCB designs, the storage and operation overhead increases significantly, affecting the overall performance.

[0004] 2. Insufficient precision and timeliness: Related technologies are difficult to quickly generate high-precision path schemes when dealing with multi-layer or high-density wiring scenarios, and are prone to efficiency bottlenecks, leading to prolonged design cycles.

[0005] 3. Poor adaptability to complex structures: Conventional algorithms have limited optimization capabilities when facing high integration or special signal requirements (such as high speed and high frequency) of modern PCBs, and are difficult to meet fine wiring requirements.

[0006] In addition, related technologies can also combine sparrow algorithms for PCB wiring, but the existing PCB wiring method based on the sparrow algorithm still has the following problems:

[0007] 1. Uneven initialization: Random parameters lead to invalid search range, making it difficult to find the optimal solution;

[0008] 2. Local optimal trap: followers rely too much on discoverers, and are prone to local optimal and ignore global paths.

[0009] To sum up, the efficiency of the optimal path of PCB wiring in related technologies is low, and it is easy to fall into local optimal and ignore global paths, making it difficult to find a suitable path, which greatly affects the effect of global wiring, and needs to be solved urgently. SUMMARY

[0010] The present application provides a printed circuit board wiring method and device to at least solve the technical problem that the efficiency of the optimal path in the PCB wiring process is low, it is easy to fall into local optimal and ignore global paths, it is difficult to find a suitable path, and it greatly affects the effect of global wiring in related technologies.

[0011] The application provides a printed circuit board wiring method, comprising the following steps: obtaining a configuration file of a target printed circuit board, and determining wiring start point coordinates and 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; performing iterative calculation according to the wiring optimization target and a preset Hallton sequence to obtain a target wiring position with minimum global fitness, and determining a target wiring path according to the target wiring position, so that the target printed circuit board is wired according to the target wiring path.

[0012] The application further provides a printed circuit board wiring device, comprising: a configuration file analysis module configured to obtain a configuration file of a target printed circuit board, and determine 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 configured to determine a wiring optimization target corresponding to the target printed circuit board based on the wiring start point coordinates and the wiring end point coordinates; and an algorithm iteration module configured to perform iterative calculation according to the wiring optimization target and a preset Hallton sequence to obtain a target wiring position with minimum global fitness, and determine a target wiring path according to the target wiring position, so that the target printed circuit board is wired according to the target wiring path.

[0013] The application further provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to execute the computer program to implement the steps of any of the above printed circuit board wiring methods.

[0014] The application further provides a non-volatile computer readable storage medium, wherein the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the above printed circuit board wiring methods.

[0015] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of any of the above printed circuit board wiring methods.

[0016] By the present application, the configuration file of the target printed circuit board can be obtained, and the wiring starting point coordinates and the wiring ending point coordinates of the target printed circuit board are determined based on the configuration file; based on the wiring starting point coordinates and the wiring ending point coordinates, the wiring optimization target corresponding to the target printed circuit board is determined; the global fitness minimum target wiring position is obtained through iterative calculation according to the wiring optimization target and the preset Hallton sequence, and the target wiring path is determined according to the target wiring position, so that the target printed circuit board is wired according to the target wiring path, thereby the technical problem that in the related art, the efficiency of the optimal path searching in the PCB wiring process is low, the global path is easily ignored due to being trapped in local optimal, it is difficult to find a suitable path, and the global wiring effect is greatly affected can be solved, and the technical effects that the initialization of the population is more balanced and stable through the strategy improvement of the sparrow algorithm, the local optimal solution can be effectively avoided, the global search ability is improved, and thus a suitable wiring path can be more efficiently searched, and the wiring accuracy is improved are achieved. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0018] Figure 1 A flowchart of a printed circuit board wiring method according to an embodiment of the present application is provided.

[0019] Figure 2 An execution logic schematic diagram of a sparrow search algorithm model according to an embodiment of the present application is provided.

[0020] Figure 3 An execution logic schematic diagram of a printed circuit board wiring method according to an embodiment of the present application is provided.

[0021] Figure 4 An execution logic schematic diagram of a sparrow search algorithm model fused with Hallton sequence according to an embodiment of the present application is provided.

[0022] Figure 5 An example diagram of a printed circuit board wiring device according to an embodiment of the present application is provided.

[0023] Among them, 10-printed circuit board wiring device, 100-configuration file analysis module, 200-optimization target determination module, 300-algorithm iteration module. DETAILED DESCRIPTION

[0024] With reference to the drawings and specific embodiments, the technical solutions in the embodiments of the present application will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0025] It should be noted that, in the description of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0026] In order for those skilled in the art to better understand the technical solutions of the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0027] In combination with the specific application environment architecture or specific hardware architecture on which the printed circuit board wiring method is executed, the specific application environment architecture or specific hardware architecture is described herein.

[0028] The embodiments of the present application provide a printed circuit board wiring method.

[0029] As shown in Figure 1 FIG. 1 is a flowchart of the printed circuit board wiring method according to an embodiment of the present application, wherein the printed circuit board wiring method comprises the following steps:

[0030] In step S101, the configuration file of the target printed circuit board is obtained, and the wiring starting point coordinates and the wiring ending point coordinates of the target printed circuit board are determined based on the configuration file.

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

[0032] Therefore, the embodiments of the present application realize fast coordinate positioning through standardized parsing operation, improve the wiring efficiency and accuracy, and provide accurate starting point and ending point data for subsequent automatic wiring.

[0033] Optionally, in an embodiment of the present application, the configuration file of the target printed circuit board is acquired, and the wiring start point coordinate and the wiring end point coordinate 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 coordinate component information; acquiring the wiring design requirement of the target printed circuit board, and determining the wiring start point coordinate and the wiring end point coordinate based on the wiring design requirement and the coordinate component information.

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

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

[0036] Thirdly, the embodiment of the present application can acquire the design requirement of the PCB (such as the electrical connection rule, signal priority, etc.), and determine the component pair to be connected in combination with the coordinate component information; for example, the pin A of chip U1 needs to be connected to the positive electrode of capacitor C1.

[0037] After that, the embodiment of the present application can calculate the start point coordinate and the end point coordinate of the optimal wiring path according to the physical position of the component, so as to automatically avoid other components or forbidden wiring areas, and can verify the coordinate rationality through the design rule check to ensure that there is no short circuit or spacing violation.

[0038] Therefore, the embodiment of the present application can automatically parse and coordinate to reduce manual errors, and integrate the design rule check, effectively improve the wiring efficiency, avoid electrical conflict, and support various design requirements, which can be well applied to complex PCB layout.

[0039] As a kind of implementation mode, the specific process that the embodiment of the present application determines wiring start point coordinate and wiring end point coordinate is as follows:

[0040] 1, requirement analysis and constraint extraction:

[0041] 1) acquire the wiring design requirement of the PCB, including electrical characteristic requirement, signal transmission priority and impedance matching condition;

[0042] 2) parse the coordinate component information, and extract the physical position and connection relationship of the key component.

[0043] 2, intelligent start and end point decision:

[0044] 1) Based on signal flow analysis, determine the transmission direction of the critical path, and preferentially select the end point of the shortest electrical path as the candidate coordinate;

[0045] 2) Combine thermal distribution analysis and electromagnetic compatibility evaluation to screen the optimal start and end point combination.

[0046] 3. Dynamic coordinate optimization:

[0047] 1) Use graph theory algorithm to construct component connection topology graph, and correct start and end point coordinates through shortest path algorithm;

[0048] 2) Introduce obstacle avoidance mechanism to ensure that the start and end point coordinates are conflict-free with the existing layout.

[0049] 4. Output and verification:

[0050] 1) Generate a set of start and end point coordinates, and verify their rationality through simulation tools;

[0051] 2) Output the final coordinates to the routing optimization system.

[0052] It should be noted that in the process of determining the above start and end points, the embodiments of the present application also need to establish a signal criticality scoring model, preferentially select the end point of high priority signals as the start and end point, and train a prediction model combined with historical routing data to obtain the potential optimal start and end point combination.

[0053] In addition, in the embodiments of the present application, the above dynamic coordinate optimization adopts a multi-objective trade-off strategy to simultaneously optimize path length, signal delay and manufacturing cost.

[0054] Therefore, the embodiments of the present application adjust the start and end points based on real-time layout, can be compatible with high-density complex design scenarios, and break through the inherent mode of traditional manual specification of start and end points. The optimal coordinates can be automatically determined through multi-dimensional analysis, and the reliability of PCB routing is improved.

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

[0056] Further, after the PCB is coordinate-based by the routing software, the routing start point coordinates and the routing end point coordinates of the PCB are determined, the embodiments of the present application can construct the routing optimization target corresponding to the PCB according to the routing start point coordinates and the routing end point coordinates, thereby providing reliable data support for subsequent construction of the sparrow search algorithm (i.e. sparrow search algorithm model) applied in the PCB routing scene.

[0057] In step S103, the iteration calculation is performed according to the wiring optimization target and the preset Halton sequence to obtain the target wiring position with the minimum global fitness, and a target wiring path is determined according to the target wiring position, so as to wire the target printed circuit board according to the target wiring path.

[0058] In actual implementation, the sparrow search algorithm can be used to perform fitness iteration calculation in the process of PCB wiring, in combination with the Halton sequence, on the premise that the start point coordinate and the end point coordinate are determined.

[0059] In the iteration calculation process, the embodiment of the present application can judge whether the fitness iteration calculation operation of the sparrow search algorithm model meets the iteration end requirement, so as to terminate the fitness iteration calculation operation in the case that the fitness iteration calculation operation meets the iteration end requirement, so as to obtain the target wiring position with the minimum global fitness, and determine a target wiring path with the shortest length while avoiding obstacles such as elements in the PCB according to the target wiring position, so as to wire the printed circuit board according to the target wiring path.

[0060] Therefore, the embodiment of the present application optimizes the PCB wiring path by combining the sparrow search algorithm with the Halton sequence, so as to intelligently judge the iteration termination condition, quickly lock the globally optimal path, avoid invalid iteration, and significantly improve the efficiency and reliability of the PCB wiring path design.

[0061] Optionally, in an embodiment of the present application, the iteration calculation is performed according to the wiring optimization target and the preset Halton 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 the initial value of the population and the evaluation function of the sparrow search algorithm model based on the wiring optimization target and the preset Halton sequence; performing fitness iteration calculation operation based on the sparrow search algorithm model, in combination with the initial value of the population 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 determine a global fitness minimum individual according to the first target individual and the second target individual, and update the second target individual through the global fitness minimum individual; judging whether the fitness iteration calculation operation meets the preset iteration end requirement, wherein if the fitness iteration calculation operation meets the iteration end requirement, the fitness iteration calculation operation is terminated to obtain the target wiring position with the minimum global fitness.

[0062] Those skilled in the art should understand that the sparrow search algorithm is a close cooperation optimization algorithm, and the foraging process is divided into two behavior strategies: discoverer and follower. The discoverer is the leader of the population and has a wider search range than other individuals, and its role is to guide other individuals in the population to find food and provide the best position; the process of finding the best position is to find the optimal path of the wiring in the PCB, and the final connected path can be output through the algorithm.

[0063] In addition, there are many components on the PCB and some prohibited wiring areas, and these obstacles should be avoided during wiring, and there should be no intersection with the prohibited wiring area. Therefore, during automatic wiring, it is restricted by the shortest wiring path, obstacle avoidance and other factors, which is also an evaluation factor that needs to be considered when using the sparrow search algorithm to optimize the wiring path.

[0064] However, the sparrow search algorithm model also has defects, and the wiring success rate is low when the sparrow search algorithm model is used for wiring on the PCB. The specific defects are as follows:

[0065] 1. The population distribution is not uniform, and the discoverer 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.

[0066] 2. The follower is an individual that updates its state according to the discoverer's information (coordinate position, discoverer number), and tends to move in the direction indicated by the discoverer in the hope of finding a better solution; when the discoverer falls into a local optimum, the follower may follow into this local optimal region due to its dependence on the discoverer's information, causing the entire population to wander in the local area and making it difficult to jump 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 wiring path being limited to local selection and ignoring the global optimal path.

[0067] Based on the above problems, the embodiments of the present application can improve the sparrow search algorithm model to ensure that the population initialization 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 the PCB.

[0068] Specifically, in constructing the PCB corresponding wiring optimization target according to the wiring start point coordinates and the wiring end point coordinates, the embodiment of the application can abstract the wiring optimization problem (i.e. the wiring optimization target) into a sparrow search algorithm model to seek the optimal solution problem of the two-point connection in a certain range of plane space through the sparrow search algorithm model; secondly, in order to solve the problem that the population obtained by the sparrow search algorithm model using a random function for random initialization of the population emphasizes the randomness of the population too much and cannot guarantee that all coordinate points are uniformly distributed in the PCB board, the embodiment of the application can use the Halton sequence to generate uniformly distributed random numbers to initialize the population in order to better control the initial population individuals and improve the richness of the population individuals.

[0069] Thirdly, the embodiment of the application also needs to determine the evaluation function of the sparrow search algorithm model to calculate the fitness value of each sparrow (i.e. path), sort the sparrows in the population according to the fitness value, and thus select the optimal path. In the embodiment of the application, the evaluation function of the PCB wiring mainly includes two standards of the length of the wiring path and whether collision occurs with obstacles.

[0070] After each population iteration through the sparrow search algorithm model, the embodiment of the application can calculate the optimal point and the worst point in the PCB population according to the population calculation formula, and change the position of the worst point by using the corresponding change strategy (such as the worst point update strategy) to generate a new path position, thereby increasing the ability of the algorithm to jump out of the local optimum.

[0071] Therefore, the embodiment of the application constructs the wiring optimization target through the wiring start point coordinates and the wiring end point coordinates, and realizes intelligent optimization by introducing the sparrow search algorithm, so as to quickly lock the optimal wiring scheme, reduce the number of iterations, and be applicable to the complex wiring scene of high-density PCBs; in addition, the embodiment of the application initializes the population by using the Halton sequence and combines it with the sparrow search algorithm model, so as to better control the initial population individuals, speed up the search for high-quality solution positions of individuals, and improve the speed and accuracy of algorithm convergence.

[0072] In actual execution process, the embodiment of the application can judge whether the fitness iteration calculation operation meets the iteration end requirement (such as the fitness value reaching the optimal solution range or reaching the maximum number of iterations).

[0073] If the iteration end requirement is met, the embodiment of the application can output the final target wiring position (i.e. the key coordinate point of the optimal wiring path), and call the drawing software (such as AutoCAD, Altium Designer) to automatically generate the wiring path diagram for PCB production.

[0074] If the iteration end requirement is not met, the sparrow search algorithm can be continued to be executed to enter the next round of iteration to adjust the PCB wiring path.

[0075] Therefore, the embodiment of the application can generate a standard wiring file through drawing software, seamlessly connect the manufacturing process, and greatly improve the efficiency and accuracy of PCB wiring.

[0076] Optionally, in an embodiment of the application, a corresponding sparrow search algorithm model is established according to a wiring optimization target, including: based on wiring start point coordinates and wiring end point coordinates, a corresponding physical space mathematical model and wiring constraint conditions are established to construct an initial wiring space model according to the physical space mathematical model and the wiring constraint conditions; the electrical characteristic requirements of the target printed circuit board are determined, and a multi-objective optimization function is constructed according to the electrical characteristic requirements and the initial wiring space model; based on the initial wiring space model and the multi-objective optimization function, a sparrow search algorithm model is established.

[0077] In the specific implementation process, the embodiment of the application constructs a wiring optimization target of the PCB, and the specific process of establishing a sparrow search algorithm model according to the wiring optimization target is as follows:

[0078] 1. Obtain the wiring start point coordinates and end point coordinates of the PCB to establish an initial wiring space model.

[0079] 1) Basic data preparation: by obtaining the wiring start point and end point coordinates of the PCB, a mathematical model of the physical space is established to provide a search space boundary for subsequent optimization.

[0080] 2) Constraint condition determination: the coordinate information implies the physical restrictions (such as board edge distance, fixed component position, etc.) that the wiring path must comply with.

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

[0082] 2. According to the electrical characteristic requirements of the circuit board, a multi-objective optimization function is constructed, and the path length, signal integrity and electromagnetic compatibility indicators are comprehensively considered, wherein the multi-objective optimization function can adopt a weighted fusion manner, and the weights of each sub-target can be dynamically adjusted according to the signal type:

[0083] 1) Optimization target quantization: the electrical characteristics (signal integrity, EMC (Electromagnetic Compatibility)) and engineering requirements (such as path length) are converted into mathematical expressions to form calculable evaluation criteria.

[0084] 2) Dynamic weight mechanism: according to the signal type (such as high-speed signal needs to ensure the delay first, power signal needs to reduce noise) to adjust the weight of each sub-target in real time, and reflect the design priority.

[0085] It should be noted that the path length in the multi-objective optimization function can be calculated based on the spatial relationship between the starting point and the ending point according to the embodiments of the present application; in addition, the sparrow search algorithm model also needs to optimize the multi-objective optimization function through iteration to generate a feasible solution.

[0086] 3. Design an adaptive sparrow search algorithm model:

[0087] 1) Automatically adjust the population size and the number of iterations based on the wiring complexity to ensure that the search capability matches the problem difficulty;

[0088] 2) Use a dynamic discoverer-sentry ratio allocation mechanism to balance global exploration and local development capabilities;

[0089] 3) Introduce an obstacle avoidance operator to enhance path feasibility.

[0090] Therefore, the embodiments of the present application can be operated through intelligent parameter adjustment and multi-objective collaborative optimization, thereby getting rid of the limitations of fixed parameters of traditional algorithms, and can simultaneously meet the requirements of electrical performance and geometric constraints.

[0091] Optionally, in an embodiment of the present application, after establishing the corresponding sparrow search algorithm model according to the wiring optimization target, it further includes: obtaining the wiring parameters of the target printed circuit board in the configuration file; determining a plurality of model parameters of the sparrow search algorithm model based on the wiring parameters and the wiring optimization target, wherein the plurality of model parameters include population size, discoverer ratio, sentry ratio, target function dimension, limit range and maximum iteration number.

[0092] It should be noted that the initialization parameters required by the sparrow search algorithm model can be associated with the automatic wiring parameters, and combined with the wiring optimization target to further determine the plurality of model parameters of the sparrow search algorithm model, which include the population size (i.e. the number of paths connecting the starting point and the ending point, which can be set to 100), the dimension of the population (i.e. the target function dimension, the present embodiment only considers the PCB wiring of the same layer, so it can be set to 2), the limit range (i.e. the search space boundary, which is represented as the maximum value of the X-axis and Y-axis coordinates of the PCB path point in the embodiments of the present application, which can be set to [0, 100]), the discoverer ratio (which can be set to 0.7), the sentry ratio (which can be set to 0.2) and the maximum iteration number (which can be set to 100).

[0093] Therefore, the embodiment of the application realizes intelligent routing optimization by analyzing the PCB wiring parameters and the optimization target, and dynamically configuring the key parameters (such as the population size, the proportion of discoverers, etc.) of the sparrow search algorithm, and can adaptively match different wiring scenes, thereby effectively improving the convergence efficiency.

[0094] As an implementable manner, the embodiment of the application can first extract the wiring parameters of the PCB from the configuration file, including the line width constraint, the interlayer via restriction, and the obstacle distribution data, etc.; secondly, the embodiment of the application can establish a multi-objective optimization function according to the wiring optimization target, so as to comprehensively consider the path length, the signal integrity, and the manufacturing cost factors; then, the embodiment of the application can dynamically configure a plurality of model parameters corresponding to the sparrow search algorithm model by using an adaptive mechanism, and the setting strategy of each model parameter is as follows:

[0095] 1. Automatically adjusting the population size in the plurality of model parameters based on the wiring complexity, and using large population search in high-density areas;

[0096] 2. Intelligent distribution of the proportion of discoverers and sentries according to the obstacle distribution density;

[0097] 3. Determining the function dimension according to the number of wiring layers and key nodes;

[0098] 4. Setting the limit range based on the actual size of the PCB and the safety distance;

[0099] 5. Dynamically adjusting the maximum number of iterations by using a convergence speed monitoring mechanism.

[0100] It should be noted that the execution process of the adaptive mechanism in the embodiment of the application mainly includes the following steps:

[0101] 1. Establishing a parameter prediction model, and predicting the optimal initial parameter combination by using historical wiring data;

[0102] 2. Real-time monitoring of the fitness change rate, and dynamically adjusting the exploration and development capability of the algorithm.

[0103] In the actual execution process, the multi-objective optimization function can adopt a weighted summation manner, and the weights of each sub-target can be dynamically adjusted according to the wiring priority.

[0104] Therefore, the embodiment of the application introduces the adaptive parameter configuration mechanism into the sparrow search algorithm model, thereby getting rid of the traditional artificial parameter adjustment limitation, improving the algorithm applicability, and automatically adjusting the exploration and development strategy according to the wiring process, while optimizing the electrical performance and geometric constraint indicators.

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

[0106] It should be noted that the specific steps of initializing the population data by the embodiment of the present application are as follows:

[0107] 1. Base selection:

[0108] One or more prime numbers are selected as the base of the Halton sequence, and since the PCB wiring is performed in a two-dimensional plane, the two bases of the embodiment of the present application can be selected as 2 and 3;

[0109] 2. Initialization:

[0110] The starting point (0, 0) of the Halton sequence is set, and the sequence length and the iteration number of the Halton sequence are initialized;

[0111] 3. Generate sequence elements:

[0112] The selected base is used for iterative calculation to generate sequence elements of the Halton sequence w , and then the population initial value of the sparrow search algorithm model is determined according to the sequence elements w , and the calculation formula of the sequence elements is as follows:

[0113]

[0114] wherein, represents the base, which is the basic numerical value for iterative calculation to generate the sequence elements w , and ; w is any integer greater than 1; represents the coefficient, which is the coefficient of different power terms participating in constructing the numerical value of w in the iterative calculation w ; {0,1,… }( i =0,1,… m ).

[0115] Therefore, the embodiment of the application improves the efficiency of internal population communication, avoids the random complex calculation process of the population, improves the optimization efficiency and optimization performance of the algorithm, can accurately and quickly seek the optimal value, and can quickly locate the population of the regional classification of the PCB, optimizes the selection of the population in the sparrow search algorithm model, and improves the efficiency of the PCB wiring.

[0116] Optionally, in an embodiment of the application, the initial value and the evaluation function of the population of the sparrow search algorithm model are determined based on the wiring optimization target and the preset Halton sequence, 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 obstacle positions in the target printed circuit board, and calculating the collision coefficient between the obstacles in the target printed circuit board and the wiring path of the target printed circuit board according to the obstacle positions, 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 a corresponding product function, and calculating the sum of the product function and the wiring path length function to generate the evaluation function.

[0117] As an implementable manner, the embodiment of the application can construct the evaluation function of the sparrow search algorithm model according to the shortest distance of the PCB wiring and the obstacle avoidance requirement, and the specific process is as follows:

[0118] 1. The length of the wiring path is taken as a standard function (i.e. the wiring path length function), and the mathematical expression is as follows:

[0119]

[0120] wherein, L represents the length of the wiring path; , is the path x axis and y axis coordinates; n represents that the path is composed of n coordinate points.

[0121] 2. The collision coefficient M of the current wiring path and the obstacles on the PCB is calculated, and a corresponding collision function is constructed. If the current wiring path does not intersect with the obstacles on the PCB, the value of M is 0; if the current wiring path intersects with the obstacles on the PCB, M>0, and it is gradually eliminated in the iteration, so as to retain the optimal wiring route.

[0122] 3. The final evaluation function is determined by integrating the wiring path length function and the collision function through the following formula:

[0123] F=L+L·M

[0124] Wherein, F represents an evaluation function.

[0125] Therefore, the embodiment of the present application balances the shortest path and the obstacle avoidance requirement by constructing the evaluation function in combination with the wiring path length and the obstacle collision coefficient, improves the wiring reliability, quantifies the evaluation standard through mathematical modeling, facilitates the automatic optimization of the PCB wiring design, and can be well applied to the intelligent wiring scene of complex circuit boards and the like.

[0126] Optionally, in an embodiment of the present application, based on the sparrow search algorithm model, in combination with the population initial value and the evaluation function, the fitness iterative calculation operation is performed to obtain the first target individual with the maximum fitness and the second target individual with the minimum fitness in each iteration process, and the global minimum fitness individual is determined according to the first target individual and the second target individual, and the second target individual is updated through the global minimum fitness individual, comprising: based on the sparrow search algorithm model, performing the fitness iterative calculation operation to calculate the fitness corresponding to the corresponding individual in the population initial value through the evaluation function in each iteration process, and determining the first target individual with the maximum fitness and the 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 second target individual; calculating the reflection product between the position difference and the 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, comparing the fitness of the reflection point, the first target individual and the second target individual to obtain the corresponding comparison result, and determining the global minimum fitness individual according to the comparison result, so as to update the second target individual through the global minimum fitness individual.

[0127] 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 fitness iterative calculation, and performs strategy calculation on the optimal fitness point and the worst fitness point appearing in each iteration process to re-determine the global worst fitness point, and the specific calculation process is as follows:

[0128] 1. Calculate the fitness corresponding to each individual in the population initial value through the evaluation function in each iteration process, determine the first target individual with the maximum fitness (namely, the optimal individual of the sparrow population) and the second target individual with the minimum fitness (namely, the worst individual of the sparrow population) in each iteration process, and the corresponding fitness values are F( ) and F( );

[0129] 2. Calculate the midpoint position of the optimal point (namely, the optimal individual) and the worst point (namely, the worst individual) as ;

[0130] 3. Calculate the reflection point based on the midpoint position and the worst individual by the following formula :

[0131] = + ( - )

[0132] wherein, is a reflection coefficient, and the value range ;

[0133] 4. Calculate the fitness of the reflection point, and compare the fitness of the reflection point, the optimal point and the worst point to obtain a corresponding comparison result, and determine the global fitness minimum individual according to the comparison result, so as to update the worst point through the global fitness minimum individual.

[0134] Therefore, the embodiment of the application initializes the population through the Halton sequence and integrates the sparrow search algorithm model, so that the PCB automatic wiring can be simply, quickly and accurately realized. In addition, the embodiment of the application improves the ability of the algorithm to jump out of the local extreme value through a special strategy (i.e. constantly updating the worst point in the iteration process) in the population iteration process, further ensures the diversity of the population, and solves the problem of falling into the local optimal solution in the sparrow search algorithm.

[0135] Optionally, in one embodiment of the present application, 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, and the second target individual is updated by the global fitness minimum individual, comprising: 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 judged 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 by the first expansion point, otherwise the second target individual is updated by the reflection point; when the fitness of the reflection point is greater than the fitness of the second target individual, a corresponding second expansion point is calculated based on the second target individual, the midpoint position and a preset compression coefficient, and it is judged 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 by 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 judged whether the fitness of the third expansion point is less than the fitness of the second target individual, wherein if the fitness of the third expansion point is less than the fitness of the second target individual, the second target individual is updated by the third expansion point, otherwise the second target individual is updated by the reflection point.

[0136] In actual execution process, the embodiments of the present application can compare fitness of the reflection point, the optimal point and the worst point, and perform corresponding worst point updating operation according to corresponding comparison results, which are described as follows:

[0137] 1, if the fitness F( ) of the reflection point is less than the fitness F( ) of the optimal point, expansion operation is performed by the following formula to obtain the first expansion point :

[0138] = + ( - )

[0139] wherein, the expansion coefficient is usually 2.

[0140] 1) it is judged whether the fitness of the first expansion point is less than the fitness of the optimal point;

[0141] 2) if the fitness F( ) of the first expansion point is less than the fitness F( Then the first expansion point As the individual with the lowest global fitness, to pass the first expansion point Worst update Otherwise, the reflection point will be... As the individual with the lowest global fitness, to utilize the reflection point Worst update .

[0142] 2. If the worst fitness F( The fitness F( ) is less than the reflection point If the value is such that the compression operation is performed using the following formula, the second expansion point can be obtained. :

[0143] = + ( - )

[0144] in, This is the compression factor, typically set to 0.5.

[0145] 1) Determine whether the fitness of the second expansion point is less than the fitness of the worst point;

[0146] 2) If the fitness F of the second expansion point is The fitness F( ) is less than the worst value. Then the second expansion point will be... As the individual with the lowest global fitness, to take advantage of the second expansion point Worst update .

[0147] 3. If the fitness F( The fitness F( ) is less than the reflection point ), and the fitness F( The fitness F( ) is less than the worst value. If the compression operation is performed using the following formula, the third expansion point can be obtained in the embodiment of this application. :

[0148] = - ( - )

[0149] in, This is the compression factor, typically set to 0.5.

[0150] 1) Determine if the fitness of the third expansion point is less than the fitness of the worst point;

[0151] 2) if the fitness F (x3) of the third expansion point x3 is less than the fitness F (xw) of the worst point xw, the third expansion point x3 is taken as the global fitness minimum individual, to update the worst point xw with the third expansion point x3, otherwise the reflection point xr is taken as the global fitness minimum individual, to update the worst point xw with the reflection point xr.

[0152] 4) by performing the above worst point updating operation, to obtain the global worst point, and to recalculate the position of the sparrow individual according to the global worst point, thereby searching for the optimal route.

[0153] Therefore, the embodiment of the application can effectively avoid local optimal solution, improve global search ability, and more efficiently and accurately search for reliable PCB wiring path, by determining the global fitness minimum individual in each fitness iteration process, to update the worst point of the current iteration.

[0154] Optionally, in an embodiment of the application, the target wiring path is determined according to the target wiring position, to wire the target printed circuit board according to the target wiring path, comprising: performing trajectory discretization processing on the target wiring position with the global minimum fitness, extracting the corresponding key nodes, to construct a node coordinate matrix according to the key nodes; constructing the corresponding initial path network based on the node coordinate matrix, and configuring the path parameters according to the initial path network and the wiring optimization target; determining the board material characteristics of the target printed circuit board, and constructing the parameterized target wiring path according to the board material characteristics, the path parameters and the preset dynamic rule adaptation mechanism; performing simulation verification on the target wiring path, to obtain the corresponding simulation result, and correcting the target wiring path according to the simulation result, to generate the final wiring path; converting the final wiring path into wiring path information in a target format, to wire the target printed circuit board according to the wiring path information in the target format.

[0155] In the specific implementation process, the PCB wiring path determination and wiring process based on the target wiring position according to the embodiment of the application are as follows:

[0156] Step 1: performing trajectory discretization processing on the target wiring position with the global minimum fitness, extracting the key nodes (including the starting point, the ending point, the interlayer conversion candidate point and the critical refuge point in the forbidden wiring area), and generating the node coordinate matrix;

[0157] ​​​​​​​​Step 2: Construct an initial path network based on the node coordinate matrix, and configure path parameters in combination with the wiring optimization target: set impedance matching segments (length of 1 / 4 of the signal wavelength) for signal interference sensitive areas, set minimum bending radius (such as no less than 3 times the line width) for high-density component areas, and configure via hole aperture (matching line width and interlayer distance) for cross-layer paths;

[0158] Step 3: Introduce a dynamic rule adaptation mechanism, adjust the line width tolerance (±5%) according to the target printed circuit board material characteristics (such as high-frequency materials), and add shielding layer identification according to the signal frequency (high frequency no less than 1GHz) to form a parameterized target wiring path;

[0159] Step 4: Simulate and verify the target wiring path, detect the signal crosstalk value (requirement no more than -30dB) through electromagnetic compatibility simulation, and verify the power path current carrying capacity (satisfy 1.2 times redundancy of maximum current) through voltage drop simulation;

[0160] Step 5: Correct the path according to the simulation results: increase the isolation distance (no less than 2 times the line width) for the line segment with excessive crosstalk, and widen the line width (increase by 20%) for the power path with insufficient current carrying capacity, to generate the final wiring path;

[0161] Step 6: Convert the final wiring path into G code recognizable by the wiring machine, including the feed speed (dynamically adjusted according to the line width, wide line no more than 50mm / s, thin line no more than 80mm / s), layer change instruction timing, and control the wiring machine to complete the PCB physical wiring.

[0162] It should be noted that in the above process, step 1 lays the foundation for path refinement through key node extraction; step 2 configures core parameters in combination with optimization targets, taking into account signal quality and process feasibility; step 3's dynamic rule adaptation makes the path adapt to different materials and signal characteristics; steps 4-5 avoid actual wiring risks in advance through simulation verification and correction; and step 6 realizes accurate conversion of the path to processing instructions. The overall process is logically coherent from digital path to physical wiring, creatively integrating path parameterization and process rules, and improving wiring reliability.

[0163] Therefore, the embodiments of the present application adapt to different wiring needs through path parameterization, and avoid risks in advance through simulation verification, so that the physical wiring instructions are more accurate, and the PCB wiring quality and production efficiency are improved.

[0164] In addition, in the specific implementation process, the embodiments of the present application can also determine the PCB via hole position, add a via hole in the path, and determine the optimal PCB wiring scheme by three-dimensional search path, and the specific process is as follows:

[0165] 1. Three-dimensional space modeling: convert the multi-layer structure of the PCB into a three-dimensional grid, and the via is used as a vertical connection node to optimize the planar routing path cooperatively;

[0166] 2. Dynamic via insertion: real-time evaluation of via position during path search, comprehensive consideration of via impedance, interlayer crosstalk and thermal effect, automatic selection of via coordinates with optimal electrical performance;

[0167] 3. Multi-objective trade-off: combining signal integrity and manufacturing cost (such as minimizing the number of vias), generating a globally optimal three-dimensional routing scheme.

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

[0169] Optionally, in an embodiment of the present application, after the target printed circuit board is routed according to the target routing path, it further comprises: obtaining actual routing data of the target printed circuit board after completing the routing, wherein the actual routing data comprises geometric parameters, electrical parameters and actual fitness values of the actual routing path, and the electrical parameters include signal delay and crosstalk values; calculating a routing accuracy comprehensive index according to the actual routing data and the target parameters and the target fitness value of the preset target routing path, the routing accuracy comprehensive index comprising a geometric coincidence degree, an electrical parameter compliance rate and a fitness deviation rate; judging whether the routing accuracy comprehensive index reaches a preset threshold; if the routing accuracy comprehensive index does not reach the preset threshold, optimizing the pre-constructed sparrow search algorithm model according to the geometric coincidence degree and the fitness deviation rate, and adjusting the step parameter of the Halton sequence according to the electrical parameter compliance rate, so as to reiterate calculation according to the optimized sparrow search algorithm model and the adjusted step parameter of the Halton sequence; if the routing accuracy comprehensive index reaches the preset threshold, storing the actual routing data as a reference routing template.

[0170] It should be noted that the specific process of evaluating and optimizing the PCB routing accuracy after routing is as follows:

[0171] Step 1: obtaining actual routing data of the target printed circuit board after completing the routing according to the target routing path, wherein the actual routing data comprises geometric parameters, electrical parameters and corresponding actual fitness values of the actual routing path, the geometric parameters include path length and corner number, and the electrical parameters include signal delay and crosstalk values;

[0172] Step 2: calculating a wiring accuracy comprehensive index according to the actual wiring data and the target parameters and the target fitness value of the target wiring path, wherein the wiring accuracy comprehensive index includes a geometric coincidence degree, an electrical parameter compliance rate and a fitness deviation rate of the actual path and the target path, and the three can be fused into a quantitative index (i.e., the wiring accuracy comprehensive index) through a preset weight;

[0173] Step 3: if the wiring accuracy comprehensive index does not reach a preset threshold, adjusting a local search factor of the sparrow search algorithm according to the geometric coincidence degree deviation direction, adjusting a step parameter of the Halton sequence according to the electrical parameter compliance rate, and then re-executing the wiring iteration calculation; if the wiring accuracy comprehensive index reaches the preset threshold, storing the current wiring parameters and algorithm configuration as a reference template.

[0174] It can be understood that the embodiments of the present application calculate the wiring accuracy comprehensive index including the geometric coincidence degree, the electrical parameter compliance rate and the 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 parameter of the Halton sequence according to whether the corresponding index meets the standard, so as to realize the iteration optimization of the wiring result or the algorithm.

[0175] Therefore, the embodiments of the present application realize the quantitative evaluation of the PCB wiring accuracy through the evaluation and optimization of the PCB wiring accuracy, realize the closed-loop optimization by adjusting the algorithm parameters, thereby improving the wiring precision and the algorithm adaptability, reducing the manual intervention, and improving the reliability and efficiency of the PCB wiring.

[0176] Optionally, in an embodiment of the present application, the wiring accuracy comprehensive index is calculated according to the actual wiring data and the target parameters and the target fitness value of the preset target wiring path, and the wiring accuracy comprehensive index includes the geometric coincidence degree, the electrical parameter compliance rate and the fitness deviation rate, including: calculating the spatial distance deviation, the length relative deviation and the corner number difference between the actual wiring data and the target wiring path, and performing a normalized weighted summation operation on the spatial distance deviation, the length relative deviation and the corner number difference to obtain the geometric coincidence degree; calculating a first wiring proportion of the signal time delay within a preset error range and a second wiring proportion of the crosstalk value lower than a preset crosstalk value threshold, and calculating the product of the first wiring proportion and the second wiring proportion 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 proportion between the absolute value of the difference and the target fitness value to determine the fitness deviation rate according to the proportion.

[0177] In actual execution, the geometric fitness in the embodiments of the application can be determined by the normalized weighted sum of the spatial distance deviation, the length relative deviation and the corner number difference 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 within the allowed range of the actual signal delay error and the wiring proportion with the actual crosstalk value below the threshold; the fitness deviation rate is determined by the proportion of the absolute difference between the actual fitness value and the target fitness value to the target fitness value.

[0178] Therefore, the embodiments of the application refine the index calculation by normalized weighting, proportion multiplication and the like, enhance the accuracy and consistency of PCB wiring evaluation, provide a more reliable basis for the adjustment of algorithm parameters, and ensure the accuracy of model optimization direction.

[0179] The execution logic of the sparrow search algorithm model of the application is described below in conjunction with the accompanying drawings.

[0180] Figure 2 The execution logic of the sparrow search algorithm model of the application is described below in conjunction with the accompanying drawings. Figure 2 As shown in the figure, the execution process of the sparrow search algorithm model of the application is as follows:

[0181] S201: Initialize the sparrow search algorithm parameters;

[0182] S202: Establish the problem feasible solution;

[0183] S203: Dynamically update the feasible data;

[0184] 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;

[0185] S205: End iteration.

[0186] The execution logic of the printed circuit board wiring method of the application is described below in conjunction with the accompanying drawings.

[0187] Figure 3 The execution logic of the printed circuit board wiring method of the application is described below in conjunction with the accompanying drawings. Figure 3 As shown in the figure, the execution process of the printed circuit board wiring method of the application is as follows:

[0188] S301: Analyze the component information in the printed circuit board configuration file and coordinate it;

[0189] S302: Establish the wiring optimization target of the printed circuit board and convert it into the corresponding sparrow search algorithm model;

[0190] S303: Determine the initial value of the sparrow search algorithm model population and the evaluation function using the Halton sequence;

[0191] S304: Calculate the worst value of the evaluation function using the sparrow search algorithm model;

[0192] S305: Recalculate the worst value in each population iteration process;

[0193] S306: After the sparrow search algorithm model population iteration is completed, output the optimal routing path, and draw the optimal routing path through the drawing software.

[0194] The execution logic of the sparrow search algorithm model (i.e., the sparrow search optimization algorithm model) of the present application combined with the Halton sequence is described below by combining the accompanying drawings.

[0195] Figure 4 The execution logic diagram of the sparrow search algorithm model of the present application combined with the Halton sequence. As shown in Figure 4 The execution process of the sparrow search algorithm model (i.e., the sparrow search optimization algorithm model) of the present application combined with the Halton sequence is as follows:

[0196] S401: Start the routing software;

[0197] S402: Initialize the routing parameters;

[0198] S403: Calculate the population distribution node using the Halton sequence;

[0199] S404: Initialize the comfort of the sparrow search algorithm model;

[0200] S405: Determine whether the population iteration process of the sparrow search algorithm model reaches the maximum iteration number or reaches the optimal solution range. If the population iteration process reaches the maximum iteration number or reaches the optimal solution range, go to S406, otherwise go to S407;

[0201] S406: Output the optimal sparrow position;

[0202] S407: Calculate the optimal solution (i.e., the optimal point) and the worst solution (i.e., the worst point);

[0203] S408: Update the global worst solution in each population iteration process;

[0204] S409: Update the sparrow position and go to S405.

[0205] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software on a general hardware platform as necessary, and of course can also be realized by hardware, but in many cases the former is a better embodiment.

[0206] Embodiments of the present application also provide a printed circuit board wiring device.

[0207] As shown in the figure, the printed circuit board wiring device 10 comprises a configuration file parsing module 100, an optimization target determination module 200 and an algorithm iteration module 300. Figure 5

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

[0209] The optimization target determination module 200 is configured to determine a wiring optimization target corresponding to the target printed circuit board based on the wiring start point coordinates and the wiring end point coordinates.

[0210] The algorithm iteration module 300 is configured to perform iterative calculation according to the wiring optimization target and a preset Hallton sequence to obtain a target wiring position with minimum global fitness, and determine a target wiring path according to the target wiring position, so as to wire the target printed circuit board according to the target wiring path.

[0211] Optionally, in an embodiment of the present application, the configuration file parsing module 100 comprises a coordinate unit and a determination unit.

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

[0213] The determination unit is configured to obtain 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.

[0214] Optionally, in an embodiment of the present application, the algorithm iteration module 300 comprises an algorithm construction unit, an iterative calculation unit and a judgment unit.

[0215] The algorithm construction unit is configured to establish a corresponding sparrow search algorithm model according to the wiring optimization target, and determine initial values of a population of the sparrow search algorithm model and an evaluation function based on the wiring optimization target and a preset Hallton sequence.

[0216] ​The iteration calculation unit is configured to perform an iteration calculation operation of fitness based on the sparrow search algorithm model, in combination with the initial population value and the evaluation function, to obtain a first target individual with maximum fitness and a second target individual with minimum fitness in each iteration process, and determine a global individual with minimum fitness based on the first target individual and the second target individual, and update the second target individual by using the global individual with minimum fitness.

[0217] The judgment unit is configured to judge whether the iteration calculation operation of fitness meets a preset iteration end requirement, and terminate the iteration calculation operation of fitness to obtain the target routing position with minimum global fitness if the iteration calculation operation of fitness meets the iteration end requirement.

[0218] Optionally, in an embodiment of the present application, the algorithm construction unit comprises an initialization subunit and an accumulation subunit.

[0219] The initialization subunit is configured to randomly select at least one prime number, and determine the base of the Hall-Tom sequence based on the at least one prime number, and initialize the sequence length and the iteration number of the Hall-Tom sequence.

[0220] The accumulation subunit is configured to iteratively perform a sequence accumulation operation based on the initialized sequence length and iteration number, in combination with the base, to generate sequence elements of the Hall-Tom sequence, and determine the initial population value of the sparrow search algorithm model based on the sequence elements.

[0221] Optionally, in an embodiment of the present application, the algorithm construction unit further comprises a construction subunit, a first calculation subunit and a second calculation subunit.

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

[0223] The first calculation subunit is configured to determine the obstacle position in the target printed circuit board, and calculate a collision coefficient between the obstacle in the target printed circuit board and the routing path of the target printed circuit board based on the obstacle position, to construct a corresponding collision function based on the collision coefficient.

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

[0225] Optionally, in an embodiment of the present application, the iteration calculation unit comprises an execution subunit, a third calculation subunit, a fourth calculation subunit and a comparison subunit.

[0226] The execution subunit is configured to perform fitness iterative calculation based on the sparrow search algorithm model, to calculate the fitness of each individual in the initial population in each iteration process by using an evaluation function, and to determine a first target individual with the maximum fitness and a second target individual with the minimum fitness in each iteration process.

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

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

[0229] The comparison subunit is configured to calculate the fitness of the reflection point, and to compare the fitness of the reflection point, the first target individual and the second target individual, to obtain a corresponding comparison result, and to determine a global minimum individual based on the comparison result, to update the second target individual by using the global minimum individual.

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

[0231] The first updating subunit is configured to calculate a first expansion point corresponding to the reflection point, the midpoint position and a preset expansion coefficient when the fitness of the reflection point is less than the fitness of the first target individual, and to determine whether the fitness of the first expansion point is less than the fitness of the first target individual, wherein the second target individual is updated by using the first expansion point if the fitness of the first expansion point is less than the fitness of the first target individual, otherwise the second target individual is updated by using the reflection point.

[0232] The second updating subunit is configured to calculate a second expansion point corresponding to the second target individual, the midpoint position and a 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 the second target individual is updated by using the second expansion point if the fitness of the second expansion point is less than the fitness of the second target individual.

[0233] The third updating subunit is configured to calculate a third expansion point corresponding to 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, wherein the second target individual is updated by using the third expansion point if the fitness of the third expansion point is less than the fitness of the second target individual, otherwise the second target individual is updated by using the reflection point.

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

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

[0236] The parameter setting module is configured to determine a plurality of model parameters of the sparrow search algorithm model based on the wiring parameters and the wiring optimization target, wherein the plurality of model parameters include a population size, a discoverer ratio, an alarm ratio, a target function dimension, a limit range, and a maximum iteration number.

[0237] Optionally, in an embodiment of the present application, the algorithm construction unit comprises a first establishment unit, a first determination unit, and a second establishment unit.

[0238] The first establishment unit is configured to establish a corresponding physical space mathematical model and wiring constraint conditions based on the wiring starting 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 constraint conditions.

[0239] The first determination unit is configured to determine 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.

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

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

[0242] The wiring data acquisition module is configured to acquire actual wiring data of the target printed circuit board after completing wiring, wherein the actual wiring data includes geometric parameters, electrical parameters, and an actual fitness value of the actual wiring path, and the electrical parameters include signal time delay and crosstalk values.

[0243] The comprehensive index calculation module is configured to calculate a wiring accuracy comprehensive index according to the actual wiring data and target parameters and a target fitness value of the preset target wiring path, wherein the wiring accuracy comprehensive index includes a geometric coincidence degree, an electrical parameter compliance rate, and a fitness deviation rate.

[0244] The index analysis module is configured to determine whether the wiring accuracy comprehensive index reaches a preset threshold.

[0245] a model optimization module, configured to, if the wiring accuracy comprehensive index does not reach the preset threshold, optimize a previously constructed sparrow search algorithm model according to the geometric fitness and the fitness deviation rate, and adjust a step parameter of the Halton 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 parameter of the Halton sequence.

[0246] a template storage module, configured to, if the wiring accuracy comprehensive index reaches the preset threshold, store the actual wiring data as a reference wiring template.

[0247] Optionally, in an embodiment of the present application, the comprehensive index calculation module comprises a fitness calculation unit, a compliance rate calculation unit and a deviation rate calculation unit.

[0248] The fitness calculation unit is configured to calculate spatial distance deviation, length relative deviation and turn number difference between the actual wiring data and the target wiring path, and perform a normalized weighted summation operation on the spatial distance deviation, the length relative deviation and the turn number difference to obtain the geometric fitness.

[0249] The compliance rate calculation unit is configured to calculate a first wiring proportion with a signal time delay within a preset error range and a second wiring proportion with a crosstalk value lower than a preset crosstalk value threshold, and calculate a product of the first wiring proportion and the second wiring proportion to obtain the electrical parameter compliance rate.

[0250] The deviation rate calculation unit is configured to calculate an absolute value of a difference between the actual fitness value and the target fitness value, and calculate a proportion between the absolute value of the difference and the target fitness value to determine the fitness deviation rate according to the proportion.

[0251] Optionally, in an embodiment of the present application, the algorithm iteration module 300 comprises a discretization unit, a parameter optimization unit, a second determination unit, a simulation verification unit and a format conversion unit.

[0252] The discretization unit is configured to perform trajectory discretization processing on the target wiring position with the minimum global fitness, extract corresponding key nodes, and construct a node coordinate matrix according to the key nodes.

[0253] The parameter optimization unit is configured 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 wiring optimization target.

[0254] The second determination unit is configured to determine the board material characteristics of the target printed circuit board, and construct a parameterized target wiring path according to the board material characteristics, the path parameters and a preset dynamic rule adaptation mechanism.

[0255] The simulation verification unit is configured to simulate and verify the target routing path to obtain a corresponding simulation result, and correct the target routing path according to the simulation result to generate a final routing path.

[0256] The format conversion unit is configured to convert the final routing path into routing path information in a target format, and route the target printed circuit board according to the routing path information in the target format.

[0257] The features of the embodiments of the printed circuit board routing device can be referred to the related descriptions of the embodiments of the printed circuit board routing method, which will not be repeated here.

[0258] The embodiments of the present application also provide an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above embodiments of the printed circuit board routing method.

[0259] The embodiments of the present application also provide a non-volatile computer readable storage medium, which stores a computer program, and the computer program is configured to perform the steps in any of the above embodiments of the printed circuit board routing method when running.

[0260] In an example embodiment, the non-volatile computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0261] The embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above embodiments of the printed circuit board routing method.

[0262] The embodiments of the present application also provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above embodiments of the printed circuit board routing method.

[0263] Those skilled in the art will further realize that the mere concepts, teachings, and embodiments described herein are merely meant to provide an enabling description of the claimed application. Accordingly, modifications and / or additions, other than those explicitly described herein, can be obvious to those skilled in the art in the light of this disclosure. The claimed application is intended to embrace all such modifications and / or additions.

[0264] The above provides a printed circuit board wiring method, device, equipment and medium. The principle and implementation of the application are described by applying specific examples. The above description of the embodiments is only used to help understand the method and its core idea. It should be pointed out that for those skilled in the art, without departing from the principle of the application, some improvements and modifications can be made to the application, and these improvements and modifications also fall within the protection scope of the claims of the application.

Claims

1. A printed circuit board wiring method, characterized in that, Includes the following steps: Obtain the configuration file of the target printed circuit board, and determine the wiring start coordinates and wiring end coordinates of the target printed circuit board based on the configuration file; Based on the coordinates of the wiring start point and the coordinates of the wiring end point, the wiring optimization target corresponding to the target printed circuit board is determined; The routing optimization target and the preset Holden sequence are used for iterative calculation to obtain the target routing position with the minimum global fitness, and the target routing path is determined according to the target routing position to route the target printed circuit board according to the target routing path. The step of obtaining the configuration file of the target printed circuit board and determining the routing start coordinates and routing end coordinates of the target printed circuit board based on the configuration file includes: The configuration file of the target printed circuit board is obtained. The electrical characteristic requirements, signal transmission priority and impedance matching conditions of the target printed circuit board are determined according to the configuration file. Based on the electrical characteristic requirements, signal transmission priority and impedance matching conditions, the component information in the configuration file is parsed to obtain coordinated component information. The physical location and connection relationship of key components in the target printed circuit board are determined through the coordinated component information. Based on the physical location and the connection relationship, the critical path corresponding to the target printed circuit board is determined, and the signal flow direction of the critical path of the target printed circuit board is analyzed to determine the transmission direction of the critical path. According to the transmission direction and the pre-built signal criticality scoring model, the endpoints that meet the preset priority requirements are selected, and the endpoints are used as candidate start and end points. From the candidate start and end points, the target start point and end point combination that meets the preset thermal distribution and electromagnetic compatibility requirements is selected. Construct a component connection topology diagram corresponding to the target printed circuit board, and correct the start and end point coordinates corresponding to the target start and end point combination based on the component connection topology diagram and a preset obstacle avoidance mechanism to obtain the wiring start point coordinates and the wiring end point coordinates; After routing the target printed circuit board according to the target routing path, the method further includes: Obtain the actual wiring data of the target printed circuit board after the wiring is completed, wherein the actual wiring data includes the geometric parameters, electrical parameters and actual fitness value of the actual wiring path, and the electrical parameters include signal delay and crosstalk values; Based on the actual wiring data and the target parameters and target fitness values ​​of the preset target wiring path, a comprehensive wiring accuracy index is calculated. The comprehensive wiring accuracy index includes geometric fit, electrical parameter compliance rate and fitness deviation rate. Determine whether the comprehensive indicator of wiring accuracy has reached a preset threshold; If the overall accuracy index of wiring does not reach the preset threshold, the pre-built sparrow search algorithm model is optimized according to the geometric fit and the fitness deviation rate, and the step size parameter of the Holden sequence is adjusted 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. If the overall accuracy index of the cabling reaches the preset threshold, the actual cabling data is stored as a baseline cabling template. The method calculates a comprehensive wiring accuracy index based on the actual wiring data and the preset target parameters and target fitness values ​​of the target wiring path. This comprehensive wiring accuracy index includes geometric fit, electrical parameter compliance rate, and fitness deviation rate, among other things. Calculate the spatial distance deviation, relative length deviation, and number of turns between the actual wiring data and the target wiring path, and perform a normalized weighted summation operation on the spatial distance deviation, the relative length deviation, and the number of turns to obtain the geometric fit. Calculate the first wiring ratio where the signal delay is within a preset error range and the second wiring ratio where the crosstalk value is below 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. 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, so as to determine the fitness deviation rate based on the ratio.

2. The method according to claim 1, characterized in that, The step of iteratively calculating based on the routing optimization objective and a preset Holden sequence to obtain the target routing position with the minimum global fitness includes: A corresponding sparrow search algorithm model is established based on the wiring optimization objective, and the initial population value and evaluation function of the sparrow search algorithm model are determined based on the wiring optimization objective and the preset Holden sequence. Based on the sparrow search algorithm model, and combined with the initial population value and the evaluation function, a fitness iterative calculation operation is performed to obtain the first target individual with the highest fitness and the second target individual with the lowest fitness in each iteration. The individual with the lowest global fitness is determined based on the first target individual and the second target individual, and the second target individual is updated through the individual with the lowest global fitness. Determine whether the fitness iteration calculation operation meets the preset iteration end requirement. If the fitness iteration calculation operation meets the iteration end requirement, then terminate the fitness iteration calculation operation to obtain the target wiring position with the minimum global fitness.

3. The printed circuit board wiring method according to claim 2, characterized in that, The process of determining the initial population value and evaluation function of the sparrow search algorithm model based on the wiring optimization objective and the preset Holden sequence includes: Randomly select at least one prime number, determine the cardinality of the Holden sequence based on the at least one prime number, and initialize the sequence length and number of iterations of the Holden sequence; Based on the initialized sequence length and number of iterations, and in conjunction with the cardinality, the sequence accumulation operation is iteratively performed to generate the sequence elements of the Holden sequence, and the initial population value of the sparrow search algorithm model is determined according to the sequence elements.

4. The printed circuit board wiring method according to claim 2, characterized in that, The step of determining the initial population value and evaluation function of the sparrow search algorithm model based on the wiring optimization objective and the preset Holden sequence further includes: Based on the coordinates of the wiring start point and the coordinates of the wiring end point, a wiring path length function corresponding to the target printed circuit board is constructed; The positions of obstacles in the target printed circuit board are determined, and the collision coefficient between the obstacles in the target printed circuit board and the wiring path of the target printed circuit board is calculated based on the obstacle positions. Based on the collision coefficient, a corresponding collision function is constructed. Calculate the product of the routing path length function and the collision coefficient to obtain the corresponding product function, and calculate the sum of the product function and the routing path length function to generate the evaluation function.

5. The printed circuit board wiring method according to claim 2, characterized in that, The step of performing fitness iterative calculation based on the sparrow search algorithm model, combined with the initial population value and the evaluation function, to obtain the first target individual with the highest fitness and the second target individual with the lowest fitness in each iteration, and determining the individual with the lowest global fitness based on the first target individual and the second target individual, and updating the second target individual using the individual with the lowest global fitness, includes: Based on the sparrow search algorithm model, a fitness iterative calculation operation is performed to calculate the fitness of the corresponding individual in the initial value of the population through the evaluation function in each iteration, and to determine the first target individual with the largest fitness and the second target individual with the smallest fitness in each iteration. Calculate the midpoint positions corresponding to the first target individual and the second target individual, and calculate the position difference between the midpoint positions and the second target individual; Calculate the reflection product between the position difference and the preset reflection coefficient, and calculate the sum of the reflection product and the midpoint position to obtain the corresponding reflection point; The fitness corresponding to the reflection point is calculated, and the fitness of the reflection point, the first target individual, and the second target individual are compared to obtain the corresponding comparison result. The individual with the minimum global fitness is determined based on the comparison result, and the second target individual is updated using the individual with the minimum global fitness.

6. The printed circuit board wiring method according to claim 5, characterized in that, The step of 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 based on the comparison result, so as to update the second target individual 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 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, the corresponding second expansion point is calculated based on the second target individual, the midpoint position and the preset compression coefficient, and it is determined 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, a corresponding third expansion point is calculated based on the second target individual, the midpoint position, and the compression coefficient. It is then 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.

7. The printed circuit board wiring method according to claim 2, characterized in that, After establishing the corresponding sparrow search algorithm model based on the wiring optimization objective, the method further includes: Obtain the wiring parameters of the target printed circuit board in the configuration file; Based on the wiring parameters and the wiring optimization objective, various model parameters of the sparrow search algorithm model are determined, including population size, discoverer ratio, watcher ratio, objective function dimension, boundary range, and maximum number of iterations.

8. The printed circuit board wiring method according to claim 2, characterized in that, The step of establishing a corresponding sparrow search algorithm model based on the wiring optimization objective includes: Based on the coordinates of the starting point and the ending point of the cabling, a corresponding physical space mathematical model and cabling constraints are established, so as to construct an initial cabling space model according to the physical space mathematical model and the cabling constraints. Determine the electrical characteristic requirements of the target printed circuit board, and construct a multi-objective optimization function based on the electrical characteristic requirements and the initial wiring space model; Based on the initial wiring space model and the multi-objective optimization function, the sparrow search algorithm model is established.

9. The printed circuit board wiring method according to claim 1, characterized in that, The step of determining the target wiring path based on the target wiring location, and wiring the target printed circuit board according to the target wiring path, includes: The trajectory of the target wiring position with the minimum global fitness is discretized, and the corresponding key nodes are extracted to construct a node coordinate matrix based on the key nodes. Based on the node coordinate matrix, a corresponding initial path network is constructed, and path parameters are configured according to the initial path network and the wiring optimization target; The board material characteristics of the target printed circuit board are determined, and a parameterized target routing path is constructed based on the board material characteristics, the path parameters, and a preset dynamic rule adaptation mechanism. The target routing path is simulated and verified to obtain the corresponding simulation results, and the target routing path is corrected based on the simulation results to generate the final routing path. The final routing path is converted into routing path information in a target format, so as to route the target printed circuit board according to the routing path information in the target format.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the printed circuit board wiring method as described in any one of claims 1 to 9 when executing the computer program.

11. 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 as described in any one of claims 1 to 9.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the printed circuit board wiring method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Wiring method, system and device and storage medium

    CN118862813A