Circuit topology diagram generation method, device, equipment and storage medium

The initial circuit topology is mapped into a continuous vector and updated through the reversible flow model, which solves the problem of low efficiency of circuit topology design in the existing technology and achieves efficient satisfaction and automatic generation of target circuit performance.

CN117391032BActive Publication Date: 2024-09-24ZHEJIANG JIESHU LAW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311449884.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2024-09-24
Estimated Expiration
2043-11-01

AI Technical Summary

Technical Problem

In the current circuit topology design process, the upper limit of circuit performance is limited by the topology structure, which cannot be automated or intelligent. It relies on manual experience. The algorithm has low efficiency and slow convergence speed, making it difficult to achieve the target performance.

Method used

The reversible flow model is used to map the initial adjacency matrix into a continuous vector, update the target continuous vector, and obtain the target adjacency matrix through reverse mapping, determine the target circuit topology, and achieve the target circuit performance.

Benefits of technology

The efficiency of circuit topology diagram generation is improved, the target circuit performance is accurately met, and manual intervention and calculation time are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117391032B
    Figure CN117391032B
Patent Text Reader

Abstract

The present application provides a circuit topology diagram generation method, device, equipment and storage medium, and relates to the field of circuit design technology. The method includes: according to a preset circuit function, obtaining an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram, using a preset reversible flow model to map the initial adjacency matrix to an initial continuous vector, updating the initial continuous vector according to the target circuit performance of the preset circuit function to obtain a target continuous vector, using a reversible flow model to restore the target continuous vector to a target adjacency matrix, and determining that the circuit topology diagram corresponding to the target adjacency matrix is ​​the target circuit topology diagram of the preset circuit function. The initial adjacency matrix is ​​mapped to an initial continuous vector through a reversible flow model, the initial continuous vector is updated to obtain a target continuous vector, and the target continuous vector is restored to obtain a target adjacency matrix, so that the circuit performance of the target circuit topology diagram meets the target circuit performance of the preset circuit function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of circuit design, and in particular to a method, device, equipment and storage medium for generating a circuit topology diagram. Background Art

[0002] In the overall design process of analog integrated circuits, circuit-level design is at the front end of the overall design process. Engineers need to select the types of components needed to build the circuit according to the circuit design goals, design the circuit topology, that is, design how to connect the various components, and finally determine the values ​​of the parameters of each component, and use circuit simulation software to verify whether the circuit performance meets the goals. At present, there are mature commercial tools that automatically calculate the optimal component parameter values ​​under a given circuit topology, but the upper limit of circuit performance is still limited by the circuit topology. In many cases, no matter how the component parameters are adjusted, the design goals cannot be achieved. At the topology level, engineers can only manually change the topology of the circuit and try repeatedly until the performance reaches the expected level. The design process of this circuit topology is highly dependent on the experience of engineers and cannot be separated from manual operation. It has great space for automation and intelligence.

[0003] Currently, existing methods mainly use genetic algorithms to search for circuit topologies. However, this search method relies on random crossover of gene sequences to generate new circuit topologies, lacks directionality, has low algorithm efficiency, slow convergence speed, and each time a batch of new "offspring" individuals are generated, they must be simulated one by one, which consumes a lot of time. Summary of the invention

[0004] The purpose of the present invention is to provide a circuit topology generation method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, so as to map an initial adjacency matrix into an initial continuous vector through a reversible flow model, update the initial continuous vector to obtain a target continuous vector, and then reversely map the target continuous vector to obtain a target adjacency matrix, and determine the circuit topology corresponding to the target adjacency matrix.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for generating a circuit topology diagram, comprising:

[0007] According to the preset circuit function, an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram are obtained, wherein the initial circuit topology diagram is: a plurality of topology nodes and the lines between the topology nodes, and the initial adjacency matrix includes: indication information of circuit devices between every two topology nodes in the plurality of topology nodes;

[0008] Using a preset reversible flow model, the initial adjacency matrix is ​​mapped into an initial continuous vector;

[0009] According to the target circuit performance of the preset circuit function, the initial continuous vector is updated to obtain a target continuous vector;

[0010] Using the reversible flow model, the target continuous vector is restored to a target adjacency matrix;

[0011] Determine that the circuit topology diagram corresponding to the target adjacency matrix is ​​the target circuit topology diagram of the preset circuit function.

[0012] In an optional implementation manner, the updating of the initial continuous vector according to the target circuit performance of the preset circuit function to obtain the target continuous vector includes:

[0013] According to the initial continuous vector, a preset performance prediction model corresponding to the target circuit performance is used to perform performance prediction to obtain initial circuit performance parameters of the initial circuit topology diagram;

[0014] updating the initial continuous vector according to the initial circuit performance parameter;

[0015] According to the updated continuous vector, the preset performance prediction model is used to re-perform performance prediction until a preset iteration stop condition is reached, and the continuous vector when the preset iteration stop condition is reached is determined as the target continuous vector.

[0016] In an optional embodiment, the reversible flow model includes: a normalization unit, a reversal unit, and a connection unit; the use of a preset reversible flow model to map the initial adjacency matrix into an initial continuous vector includes:

[0017] The normalization unit is used to normalize the parameters in the initial adjacency matrix to within a preset parameter range to obtain a normalized adjacency matrix;

[0018] Using the inverse flow unit to perform a first processing on the first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix;

[0019] Using the upstream unit, continue to continuously process the second unit vector in the initial processed adjacency matrix until the number of processed unit vectors meets a preset number threshold;

[0020] The connection unit is used to generate the initial continuous vector according to the processed adjacency matrix when the number of the processed unit vectors meets the preset number threshold.

[0021] In an optional embodiment, the countercurrent unit includes: a mask layer, a classification model, and a coupling layer;

[0022] The step of using the inverse flow unit to perform a first process on the first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix includes:

[0023] Using the mask layer to mask other vectors except the first unit vector in the normalized adjacency matrix to obtain a first mask matrix, and masking the first unit vector in the normalized adjacency matrix to obtain a second mask matrix;

[0024] Using the classification model to classify the second mask matrix to obtain a first classification matrix and a second classification matrix;

[0025] The coupling layer is used to couple the first mask matrix, the first classification matrix and the second classification matrix to generate the initial processed adjacency matrix.

[0026] In an optional implementation, the preset iteration stop condition is: reaching a preset number of iterations, or the circuit performance after the preset performance prediction model re-performs performance prediction and meets the target circuit performance.

[0027] In an optional implementation, before performing performance prediction based on the initial continuous vector and using a preset performance prediction model corresponding to the target circuit performance to obtain initial circuit performance parameters of the initial circuit topology diagram, the method further includes:

[0028] According to the preset circuit function, a plurality of circuit topology diagrams and an adjacency matrix of the plurality of circuit topology diagrams are obtained;

[0029] Performing device parameter tuning on the multiple circuit topologies to obtain circuit performance parameters of the multiple circuit topologies;

[0030] Generate a training data set according to the adjacency matrices of the multiple circuit topology diagrams and the circuit performance parameters of the multiple circuit topology diagrams;

[0031] The training data set is used to train an initial reversible flow model and an initial performance prediction model to obtain the reversible flow model and the performance prediction model.

[0032] In an optional implementation manner, the obtaining of an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram according to a preset circuit function includes:

[0033] According to the preset circuit function, randomly generate the initial circuit topology diagram, and obtain an initial adjacency matrix of the initial circuit topology diagram;

[0034] Alternatively, according to the preset circuit function, the initial circuit topology graph is obtained from an existing circuit topology set corresponding to the preset circuit function, and an initial adjacency matrix of the initial circuit topology graph is obtained.

[0035] In a second aspect, an embodiment of the present application further provides a circuit topology diagram generating device, the device comprising:

[0036] An acquisition module is used to acquire an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram according to a preset circuit function, wherein the initial circuit topology diagram is: a plurality of topology nodes and connections between the topology nodes, and the initial adjacency matrix includes: indication information of circuit devices between every two topology nodes in the plurality of topology nodes;

[0037] A mapping module, used to map the initial adjacency matrix into an initial continuous vector using a preset reversible flow model;

[0038] An updating module, configured to update the initial continuous vector according to the target circuit performance of the preset circuit function to obtain a target continuous vector;

[0039] A restoration module, used to restore the target continuous vector to a target adjacency matrix using the reversible flow model;

[0040] A determination module is used to determine that the circuit topology diagram corresponding to the target adjacency matrix is ​​the target circuit topology diagram of the preset circuit function.

[0041] In the third aspect, an embodiment of the present application also provides a computer device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to perform the steps of the circuit topology diagram method as described in any one of the first aspects.

[0042] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the circuit topology diagram method as described in any one of the first aspects are executed.

[0043] The beneficial effects of this application are:

[0044] The embodiment of the present application provides a method, device, equipment and storage medium for generating a circuit topology map, the method comprising: according to a preset circuit function, obtaining an initial circuit topology map and an initial adjacency matrix of the initial circuit topology map, then using a preset reversible flow model to map the initial adjacency matrix to an initial continuous vector, and according to the target circuit performance of the preset circuit function, updating the initial continuous vector to obtain a target continuous vector, and finally using the reversible flow model to restore the target continuous vector to a target adjacency matrix, and determining that the circuit topology map corresponding to the target adjacency matrix is ​​the target circuit topology map of the preset circuit function. The method of the present application maps the initial adjacency matrix to an initial continuous vector through a reversible flow model, so that it is convenient to update the initial continuous vector later to obtain a target continuous vector, and then uses the reversible flow model to reversely map the target continuous vector to obtain a target adjacency matrix, which can realize a lossless inverse operation of the target continuous vector, so that the circuit performance of the target circuit topology map meets the target circuit performance of the preset circuit function, and improves the efficiency of generating the target circuit topology map. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 One of the flow charts of a method for generating a circuit topology diagram provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of an initial circuit topology diagram provided in an embodiment of the present application;

[0048] Figure 3 A schematic diagram of an initial adjacency matrix provided in an embodiment of the present application;

[0049] Figure 4 A second flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application;

[0050] Figure 5 A third flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application;

[0051] Figure 6 A fourth flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application;

[0052] Figure 7 A schematic diagram of the structure of a reversible flow model provided in an embodiment of the present application;

[0053] Figure 8 A fifth flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application;

[0054] Fig. 9 A schematic diagram of functional modules of a circuit topology diagram generating device provided in an embodiment of the present application;

[0055] Fig.10 A schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0057] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0058] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application.

[0059] In addition, the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0060] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0061] In order to accurately determine the target circuit topology of a preset circuit function, an embodiment of the present application provides a method for generating a circuit topology. First, according to the preset circuit function, an initial circuit topology and an initial adjacency matrix of the initial circuit topology are obtained, and then a preset reversible flow model is used to map the initial adjacency matrix to an initial continuous vector. According to the target circuit performance of the preset circuit function, the initial continuous vector is updated to obtain a target continuous vector, and then the reversible flow model is used to restore the target continuous vector to a target adjacency matrix, thereby determining that the circuit topology corresponding to the target adjacency matrix is ​​the target circuit topology of the preset circuit function. The initial continuous vector is updated by a preset reversible flow model so that the circuit performance of the circuit topology corresponding to the target continuous vector is optimal, thereby accurately determining the target circuit topology of the preset circuit function.

[0062] The circuit topology diagram generation method provided by the embodiment of the present application is explained in detail by using specific examples in conjunction with the accompanying drawings. The circuit topology diagram generation method provided by the embodiment of the present application can be implemented by a computer device pre-installed with: a preset circuit topology diagram generation algorithm or detection software, by running the algorithm or software. The computer device can be, for example, a server or a terminal, and the terminal can be a user computer. Figure 1 One of the flow charts of a method for generating a circuit topology diagram provided in an embodiment of the present application; Figure 2 A schematic diagram of an initial circuit topology diagram provided in an embodiment of the present application;

[0063] Figure 3 A schematic diagram of an initial adjacency matrix provided in an embodiment of the present application. Figure 1 As shown, the method includes:

[0064] S101. Obtain an initial circuit topology map and an initial adjacency matrix of the initial circuit topology map according to a preset circuit function.

[0065] In this embodiment, the preset circuit function may include: an amplification circuit, a signal operation and processing circuit, an oscillation circuit, a demodulation circuit and other functions. According to the preset circuit function and the circuit devices required for the preset circuit function, an initial circuit diagram corresponding to the preset circuit function is obtained, and an initial circuit topology diagram corresponding to the initial circuit diagram and an initial adjacency matrix corresponding to the initial circuit topology diagram are determined.

[0066] The initial circuit topology diagram is: multiple topology nodes and the lines between the topology nodes, and the initial adjacency matrix includes: the indication information of the circuit devices between every two topology nodes in the multiple topology nodes. For example, Figure 2 As shown, according to the initial circuit diagram, it can be determined that the initial circuit diagram includes: 5 topological nodes, namely V in 、node1、node2、V outand GND. The initial circuit diagram also includes three circuit devices, namely forward operational amplifier devices, reverse operational amplifier devices and capacitors. The initial circuit diagram is abstracted in the initial circuit topology diagram, which is only a set composed of multiple topological nodes and branch connections between topological nodes. The initial circuit topology diagram can reflect the connection relationship and properties of the circuit in the initial circuit diagram.

[0067] According to the initial circuit topology diagram and the indication information of each circuit device in the initial circuit diagram, an initial adjacency matrix of the initial circuit topology diagram is generated, such as Figure 3 As shown, in which the indication information of the forward operational amplifier device in the initial circuit diagram is represented by edge weight 1, the indication information of the reverse operational amplifier device is represented by edge weight 2, and the indication information of the capacitor is represented by edge weight 3. For example, the topological node V in The circuit device connected to the topological node node1 is a forward operational amplifier device, then the topological node V in The edge weight between the topological node node1 is 1. If there are two topological nodes without circuit devices connected between them, such as topological node V in There is no circuit device connected to the topological node GND, so the edge weight between the two topological nodes is 4. Since the topological node itself is not connected to itself, it is represented by an edge weight of 0, so we get Figure 3 The initial adjacency matrix shown in FIG. It should be noted that the edge weights can be expanded according to the types of circuit devices in the initial circuit.

[0068] S102: Using a preset reversible flow model, the initial adjacency matrix is ​​mapped into an initial continuous vector.

[0069] Specifically, since the values ​​of the adjacency matrix are discrete and cannot be directly optimized, a preset reversible flow model is used to reversibly map the initial adjacency matrix into an initial continuous vector, so that the initial continuous vector can be optimized later.

[0070] S103 . Update the initial continuous vector according to the target circuit performance of the preset circuit function to obtain a target continuous vector.

[0071] Specifically, when obtaining the initial circuit topology diagram, it is also necessary to obtain the target circuit performance parameters required for the preset circuit function according to the preset circuit function, wherein the target circuit performance parameters include: gain, phase margin, gain-bandwidth product and power consumption, etc. The target circuit performance is determined according to the target circuit performance parameters. If the circuit performance of the circuit topology diagram corresponding to the initial continuous vector does not meet the target circuit performance, the initial continuous vector is updated to obtain the target continuous vector, wherein the circuit performance of the circuit topology diagram corresponding to the target continuous vector meets the target circuit performance.

[0072] S104. Using a reversible flow model, the target continuous vector is restored to a target adjacency matrix.

[0073] S105: Determine that the circuit topology diagram corresponding to the target adjacency matrix is ​​the target circuit topology diagram of the preset circuit function.

[0074] Among them, a reversible flow model is used to restore the target continuous vector to a target adjacency matrix, and according to the target adjacency matrix, a circuit topology corresponding to the target adjacency matrix is ​​determined, thereby determining a target circuit topology of a preset circuit function.

[0075] In summary, an embodiment of the present application provides a method for generating a circuit topology map, the method comprising: according to a preset circuit function, obtaining an initial circuit topology map and an initial adjacency matrix of the initial circuit topology map, then using a preset reversible flow model to map the initial adjacency matrix to an initial continuous vector, and according to the target circuit performance of the preset circuit function, updating the initial continuous vector to obtain a target continuous vector, and finally using the reversible flow model to restore the target continuous vector to a target adjacency matrix, and determining that the circuit topology map corresponding to the target adjacency matrix is ​​the target circuit topology map of the preset circuit function. The method of the present application maps the initial adjacency matrix to an initial continuous vector through a reversible flow model, so that it is convenient to update the initial continuous vector later to obtain a target continuous vector, and then uses the reversible flow model to reversely map the target continuous vector to obtain a target adjacency matrix, which can realize a lossless inverse operation of the target continuous vector, so that the circuit performance of the target circuit topology map meets the target circuit performance of the preset circuit function, and improves the efficiency of generating the target circuit topology map.

[0076] The present application embodiment also provides another possible implementation of the circuit topology diagram generation method. Figure 4 The second flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application is as follows. Figure 4 As shown, according to the target circuit performance of the preset circuit function, the initial continuous vector is updated to obtain the target continuous vector, including:

[0077] S201 . According to the initial continuous vector, a preset performance prediction model corresponding to the target circuit performance is used to perform performance prediction to obtain initial circuit performance parameters of the initial circuit topology diagram.

[0078] In this embodiment, the preset performance prediction model may adopt a multi-layer perceptron (MLP) model to predict the circuit performance of the initial circuit topology corresponding to the initial continuous vector, thereby obtaining the initial circuit performance parameters of the initial circuit topology, wherein the initial circuit performance parameters of the initial circuit topology may include: gain bandwidth product, load capacitance and power consumption, and the quality factor of the initial circuit topology is determined according to the multiple initial circuit performance parameters, and the quality factor The expression formula is as follows:

[0079]

[0080] Where GBW is the gain bandwidth product, C L It is represented as load capacitance, and Power is represented as power consumption, so that a quality factor is determined according to the predicted multiple initial circuit performance parameters. The larger the quality factor, the better the circuit performance of the initial circuit topology diagram.

[0081] S202: Update the initial continuous vector according to the initial circuit performance parameters.

[0082] Specifically, if the initial circuit performance parameters do not meet the target circuit performance parameters, that is, the circuit performance of the initial circuit topology does not meet the target circuit performance, the initial continuous vector is updated, specifically by using a reversible flow model.

[0083] S203 . Re-perform performance prediction using a preset performance prediction model according to the updated continuous vector until a preset iteration stop condition is reached, and determine the continuous vector when the preset iteration stop condition is reached as the target continuous vector.

[0084] Optionally, the preset iteration stop condition is: reaching a preset number of iterations, or the circuit performance after the preset performance prediction model re-performs performance prediction meets the target circuit performance.

[0085] Specifically, based on the updated continuous vector, the preset performance prediction model is used to re-perform performance prediction until the number of iterations of the preset performance prediction model reaches the preset number of iterations, or the circuit performance parameters after the preset performance prediction model re-performs performance prediction are greater than or equal to the target circuit performance parameters, then the continuous vector is stopped from being updated, and the continuous vector that reaches the preset iteration stop condition is determined to be the target continuous vector.

[0086] It should be noted that the preset performance prediction model predicts the circuit performance parameters of the circuit topology diagram corresponding to the target continuous vector, and determines the quality factor of the circuit topology diagram as:

[0087]

[0088] z * =argmax MLP(z)

[0089] The quality factor of the circuit topology diagram is the maximum value of multiple quality factors predicted by the preset performance prediction model.

[0090] In the method provided in the embodiment of the present application, based on the initial continuous vector, a preset performance prediction model corresponding to the target circuit performance is used to perform performance prediction, and the initial circuit performance parameters of the initial circuit topology are obtained. Then, based on the initial circuit performance parameters, the initial continuous vector is updated, and based on the updated continuous vector, the preset performance prediction model is used to re-perform performance prediction until a preset iteration stop condition is reached, and the continuous vector when the preset iteration stop condition is reached is determined to be the target continuous vector. The performance prediction is performed by using the preset performance prediction model, so that the performance prediction is more accurate and faster.

[0091] The embodiment of the present application also provides another possible implementation of the circuit topology diagram generation method, wherein the reversible flow model includes: a normalization unit, a reversal unit, and a connection unit; Figure 5 The third flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application. Figure 5 As shown, a preset reversible flow model is used to map the initial adjacency matrix into an initial continuous vector. The method includes:

[0092] S301 , using a normalization unit to normalize the parameters in the initial adjacency matrix to within a preset parameter range, to obtain a normalized adjacency matrix.

[0093] In this embodiment, the initial adjacency matrix is ​​A (0) ∈{0, 1, 2, …, c} n×n , where c represents the type of circuit device, and n represents the number of circuit topology nodes. The normalization unit can use activation normalization (ActNorm). The normalization unit ActNorm normalizes the parameters in the initial adjacency matrix to [-1,1], improves the calculation stability of the subsequent reversible flow model, and obtains a normalized adjacency matrix.

[0094] S302: Use an inverse flow unit to perform a first processing on a first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix.

[0095] S303 , using an upstream unit to continue to perform continuous processing on the second unit vector in the initial processed adjacency matrix until the number of processed unit vectors meets a preset number threshold.

[0096] Among them, the first unit vector indicates the first row vector or the first column vector in the normalized adjacency matrix. If the first unit vector is the first row vector in the normalized adjacency matrix, the second unit vector is the second row vector in the normalized adjacency matrix. If the first unit vector is the first column vector in the normalized adjacency matrix, the second unit vector is the second column vector in the normalized adjacency matrix, so that the countercurrent unit is used to perform continuous processing on each row vector or each column vector in the normalized adjacency matrix in turn.

[0097] Specifically, the inverse flow unit first performs a first process on the first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix A (1) , and then performing a second processing on the second unit vector in the initial processed adjacency matrix to obtain the adjacency matrix after the second processing, until each unit vector in the normalized adjacency matrix is ​​processed, or the number of processed unit vectors meets a preset number threshold, then stop processing the unit vector.

[0098] S304 , using a connection unit, generating an initial continuous vector according to a processed adjacency matrix when the number of processed unit vectors meets a preset number threshold.

[0099] Use the connection unit to process the adjacency matrix A (n) Perform row-by-row concatenation to generate an initial continuous vector.

[0100] In the method provided in the embodiment of the present application, a normalization unit is used to normalize the parameters in the initial adjacency matrix to within a preset parameter range to obtain a normalized adjacency matrix, and then an inverse flow unit is used to perform a first processing on the first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix, and the inverse flow unit is used to continue to perform continuous processing on the second unit vector in the initial processed adjacency matrix until the number of processed unit vectors meets a preset number threshold, and finally a connection unit is used to generate an initial continuous vector based on the processed adjacency matrix when the number of processed unit vectors meets the preset number threshold, thereby mapping the initial adjacency matrix to the initial continuous vector.

[0101] The embodiment of the present application also provides another possible implementation of the circuit topology diagram generation method, wherein the countercurrent unit includes: a mask layer, a classification model, and a coupling layer; Figure 6 The fourth flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application is as follows. Figure 6 As shown, the first unit vector in the normalized adjacency matrix is ​​first processed by using an inverse flow unit to obtain an initial processed adjacency matrix. The method includes:

[0102] S401. Use a mask layer to mask other vectors except the first unit vector in the normalized adjacency matrix to obtain a first mask matrix, and mask the first unit vector in the normalized adjacency matrix to obtain a second mask matrix.

[0103] In this embodiment, the normalized adjacency matrix is ​​classified using a mask layer to obtain a first mask matrix A1 (0) and the second mask matrix A2 (0) , wherein the first mask matrix is ​​a matrix obtained by masking other vectors except the first unit vector using a mask layer, and the first mask matrix is ​​a matrix obtained by masking the first unit vector using a mask layer. For example, if the first unit vector is the first row vector in the normalized adjacency matrix, then the first mask matrix is ​​a matrix that only retains the first row vector in the normalized adjacency matrix, and the other vectors are 0, and the second mask matrix is ​​a matrix in which the first row vector in the normalized adjacency matrix is ​​0, and the other vectors are retained.

[0104] S402: Classify the second mask matrix using a classification model to obtain a first classification matrix and a second classification matrix.

[0105] S403 , using a coupling layer to couple the first mask matrix, the first classification matrix, and the second classification matrix to generate an initial processed adjacency matrix.

[0106] The classification model can use a multi-layer perceptron (MLP) model to classify the second mask matrix A2 (0) Classification is performed, wherein the classification model uses s and t functions to fit the second mask matrix to obtain the first classification matrix s(A2 (0) ) and the second classification matrix t(A2 (0) ).

[0107] The coupling layer may use an affine coupling layer to couple the first mask matrix, the first classification matrix, and the second classification matrix to obtain an initial processed adjacency matrix. The coupling formula is as follows:

[0108]

[0109]

[0110]

[0111] in, Represented as the first mask matrix, Expressed as the second mask matrix, Represented as the first classification matrix, Represented as the second classification matrix, Expressed as the third mask matrix, Represented as the fourth mask matrix.

[0112] Since the classification model processes the second mask matrix, the third mask matrix is ​​coupled to obtain the third mask matrix, wherein the third mask matrix is ​​a matrix for masking other vectors except the first unit vector of the initial processed adjacency matrix. The difference between the third mask matrix and the first mask matrix is ​​that the first unit vector is different. The first unit vector of the first mask matrix is ​​an integer, and the first unit vector of the third mask matrix is ​​a floating point number. The fourth mask matrix is ​​a matrix for masking the first unit vector of the initial processed adjacency matrix. Since other vectors except the first unit vector are not processed, the fourth mask matrix is ​​the same as the second mask matrix. The initial processed adjacency matrix is ​​obtained by superimposing the third mask matrix and the fourth mask matrix. Similarly, the second unit vector in the initial processed adjacency matrix is ​​processed in sequence by the countercurrent unit to obtain a processed adjacency matrix when the number of processed unit vectors meets the preset number threshold.

[0113] It should be noted that, according to the initial processed adjacency matrix, the normalized adjacency matrix can be restored through the inverse flow unit. The specific restoration formula is as follows:

[0114]

[0115] Therefore, by superimposing the first mask matrix and the second mask matrix, the normalized adjacency matrix can be restored.

[0116] In the method provided in the embodiment of the present application, a mask layer is used to mask other vectors except the first unit vector in the normalized adjacency matrix to obtain a first mask matrix, and the first unit vector in the normalized adjacency matrix is ​​masked to obtain a second mask matrix; a classification model is used to classify the second mask matrix to obtain a first classification matrix and a second classification matrix; a coupling layer is used to couple the first mask matrix, the first classification matrix and the second classification matrix to generate an initial processed adjacency matrix. Thus, the first unit vector in the normalized adjacency matrix is ​​subjected to the first processing to obtain the initial processed adjacency matrix.

[0117] The present application embodiment also provides another possible implementation of the circuit topology diagram generation method. Figure 7 A schematic diagram of a reversible flow model provided in an embodiment of the present application. Figure 7 As shown, input the initial adjacency matrix A (0), the parameters in the initial adjacency matrix are normalized to [-1,1] through the normalization unit ActNorm, and then the mask layer Mask in the upstream unit masks the other vectors except the first unit vector in the normalized adjacency matrix to obtain the first mask matrix A1 (0) , and mask the first unit vector in the normalized adjacency matrix to obtain the second mask matrix A2 (0) , the second mask matrix A2 is rescaled through the classification model MLP and the scaling layer Rescale (0) Classify and get the first classification matrix s(A2 (0) ) and the second classification matrix t(A2 (0) ), and finally the coupling layer AffineCoupling is used to couple the first mask matrix A1 (0) , the first classification matrix s(A2 (0) ) and the second classification matrix t(A2 (0) ) to couple and obtain the third mask matrix A1 (1) , for the third mask matrix A1 (1) And the fourth mask matrix A2 (1) Superposition is performed to obtain the initial processed adjacency matrix A (1) Then the initial processed adjacency matrix A (1) The second unit vector of is processed continuously, and finally the processed adjacency matrix A is obtained. (n) The process of continuous processing of the second unit vector is similar to that of processing the first unit vector, and will not be described in detail here.

[0118] The present application embodiment also provides another possible implementation of the circuit topology diagram generation method. Figure 8 FIG5 is a flow chart of a method for generating a circuit topology diagram provided in an embodiment of the present application. Figure 8 As shown, according to the initial continuous vector, a preset performance prediction model corresponding to the target circuit performance is used to perform performance prediction, and before obtaining the initial circuit performance parameters of the initial circuit topology diagram, the method further includes:

[0119] S501: Acquire multiple circuit topology diagrams and adjacency matrices of the multiple circuit topology diagrams according to preset circuit functions.

[0120] S502 , optimizing device parameters of multiple circuit topologies to obtain circuit performance parameters of the multiple circuit topologies.

[0121] S503: Generate a training data set according to the adjacency matrices of the multiple circuit topology graphs and the circuit performance parameters of the multiple circuit topology graphs.

[0122] In this embodiment, according to the preset circuit function, multiple circuit topology diagrams that implement the preset circuit function and the adjacency matrix of the multiple circuit topology diagrams are obtained, and then the device parameters of the multiple circuit topology diagrams are tuned respectively to obtain the circuit performance parameters of the multiple circuit topology diagrams, and a training data set is generated based on the adjacency matrix and circuit performance parameters of the multiple circuit topology diagrams.

[0123] S504: Use the training data set to train the initial reversible flow model and the initial performance prediction model to obtain the reversible flow model and the performance prediction model.

[0124] The reversible flow model and the performance prediction model are represented by f and g respectively. The reversible flow model f is represented by: z = f(A), and the performance prediction model g is represented by: The performance prediction model is tuned by the limited memory quasi-Newton method (L-BFGS). The training objectives of the reversible flow model and the performance prediction model parameters are:

[0125]

[0126] In the method provided in the embodiment of the present application, according to the preset circuit function, multiple circuit topology diagrams and the adjacency matrix of the multiple circuit topology diagrams are obtained, the device parameters of the multiple circuit topology diagrams are tuned, and the circuit performance parameters of the multiple circuit topology diagrams are obtained. According to the adjacency matrix of the multiple circuit topology diagrams and the circuit performance parameters of the multiple circuit topology diagrams, a training data set is generated, and the initial reversible flow model and the initial performance prediction model are trained using the training data set to obtain the reversible flow model and the performance prediction model. The reversible flow model and the performance prediction model can determine the target circuit topology diagram according to the initial circuit topology diagram and the initial adjacency matrix of the initial circuit topology diagram.

[0127] The embodiment of the present application also provides another possible implementation of a method for generating a circuit topology map. According to a preset circuit function, an initial circuit topology map and an initial adjacency matrix of the initial circuit topology map are obtained. The method includes:

[0128] According to the preset circuit function, an initial circuit topology diagram is randomly generated, and an initial adjacency matrix of the initial circuit topology diagram is obtained.

[0129] Alternatively, according to the preset circuit function, an initial circuit topology graph is obtained from an existing circuit topology set corresponding to the preset circuit function, and an initial adjacency matrix of the initial circuit topology graph is obtained.

[0130] Specifically, an initial circuit topology diagram is randomly generated according to a preset circuit function and circuit devices required for the preset circuit function, or, according to the preset circuit function, the initial circuit topology diagram is obtained from an existing circuit topology set corresponding to the preset circuit function. There is no restriction on the method of obtaining the initial circuit topology diagram.

[0131] The following is a corresponding explanation of the circuit topology diagram generating device and computer equipment provided by any of the above embodiments of the present application. Its specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments mentioned above. For the sake of brief description, the parts not mentioned in this embodiment can refer to the corresponding contents in the method embodiments.

[0132] Fig. 9 A schematic diagram of the functional modules of a circuit topology diagram generating device provided in an embodiment of the present application. Fig. 9 As shown, the circuit topology diagram generating device 100 includes:

[0133] The acquisition module 110 is used to acquire an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram according to a preset circuit function, wherein the initial circuit topology diagram is: a plurality of topology nodes and the connection lines between the topology nodes, and the initial adjacency matrix includes: indication information of circuit devices between every two topology nodes in the plurality of topology nodes;

[0134] A mapping module 120, configured to map the initial adjacency matrix into an initial continuous vector using a preset reversible flow model;

[0135] An updating module 130, configured to update the initial continuous vector according to the target circuit performance of the preset circuit function to obtain a target continuous vector;

[0136] A restoration module 140, used to restore the target continuous vector to a target adjacency matrix using a reversible flow model;

[0137] The determination module 150 is used to determine that the circuit topology diagram corresponding to the target adjacency matrix is ​​the target circuit topology diagram of the preset circuit function.

[0138] Optionally, the update module 130 is also used to perform performance prediction based on the initial continuous vector and a preset performance prediction model corresponding to the target circuit performance to obtain initial circuit performance parameters of the initial circuit topology diagram; update the initial continuous vector based on the initial circuit performance parameters; and re-perform performance prediction based on the updated continuous vector using the preset performance prediction model until a preset iteration stop condition is reached, and determine that the continuous vector when the preset iteration stop condition is reached is the target continuous vector.

[0139] Optionally, the reversible flow model includes: a normalization unit, a counterflow unit, and a connection unit; the mapping module 120 is also used to use the normalization unit to normalize the parameters in the initial adjacency matrix to within a preset parameter range to obtain a normalized adjacency matrix; use the counterflow unit to perform a first processing on the first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix; use the counterflow unit to continue to perform continuous processing on the second unit vector in the initial processed adjacency matrix until the number of processed unit vectors meets a preset number threshold; use the connection unit to generate an initial continuous vector based on the processed adjacency matrix when the number of processed unit vectors meets the preset number threshold.

[0140] Optionally, the upstream unit includes: a mask layer, a classification model, and a coupling layer; the mapping module 120 is also used to use the mask layer to mask other vectors except the first unit vector in the normalized adjacency matrix to obtain a first mask matrix, and mask the first unit vector in the normalized adjacency matrix to obtain a second mask matrix; use the classification model to classify the second mask matrix to obtain a first classification matrix and a second classification matrix; use the coupling layer to couple the first mask matrix, the first classification matrix, and the second classification matrix to generate an initial processed adjacency matrix.

[0141] Optionally, the circuit topology diagram generating device 100 further includes:

[0142] A training module is used to obtain multiple circuit topology diagrams and adjacency matrices of multiple circuit topology diagrams according to preset circuit functions; optimize device parameters of multiple circuit topology diagrams to obtain circuit performance parameters of multiple circuit topology diagrams; generate a training data set according to the adjacency matrices of multiple circuit topology diagrams and the circuit performance parameters of multiple circuit topology diagrams; use the training data set to train an initial reversible flow model and an initial performance prediction model to obtain a reversible flow model and a performance prediction model.

[0143] Optionally, the acquisition module 110 is also used to randomly generate an initial circuit topology map according to a preset circuit function, and obtain an initial adjacency matrix of the initial circuit topology map; or, according to the preset circuit function, obtain the initial circuit topology map from an existing circuit topology set corresponding to the preset circuit function, and obtain an initial adjacency matrix of the initial circuit topology map.

[0144] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0145] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0146] Fig.10 The present invention provides a schematic diagram of a computer device, which can be used to generate a circuit topology diagram. Fig.10 As shown, the electronic device 200 includes: a processor 210 , a storage medium 220 , and a bus 230 .

[0147] The storage medium 220 stores machine-readable instructions executable by the processor 210. When the computer device is running, the processor 210 communicates with the storage medium 220 via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0148] Optionally, the present application further provides a storage medium 220, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method embodiment are executed. The specific implementation method and technical effect are similar and will not be repeated here.

[0149] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0151] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0152] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0153] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for generating a circuit topology diagram, characterized in that: include: According to the preset circuit function, an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram are obtained, wherein the initial circuit topology diagram is: a plurality of topology nodes and the lines between the topology nodes, and the initial adjacency matrix includes: indication information of circuit devices between every two topology nodes in the plurality of topology nodes; Using a preset reversible flow model, the initial adjacency matrix is ​​mapped into an initial continuous vector; According to the target circuit performance of the preset circuit function, the initial continuous vector is updated to obtain a target continuous vector; Using the reversible flow model, the target continuous vector is restored to a target adjacency matrix; Determine that the circuit topology diagram corresponding to the target adjacency matrix is ​​the target circuit topology diagram of the preset circuit function; The reversible flow model includes: a normalization unit, a reversal unit, and a connection unit; the preset reversible flow model is used to map the initial adjacency matrix into an initial continuous vector, including: The normalization unit is used to normalize the parameters in the initial adjacency matrix to within a preset parameter range to obtain a normalized adjacency matrix; Using the inverse flow unit to perform a first processing on the first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix; Using the upstream unit, continue to continuously process the second unit vector in the initial processed adjacency matrix until the number of processed unit vectors meets a preset number threshold; Using the connection unit, generating the initial continuous vector according to the processed adjacency matrix when the number of the processed unit vectors meets the preset number threshold; The countercurrent unit comprises: a mask layer; The mask layer is used to mask other vectors except the first unit vector in the normalized adjacency matrix to obtain a first mask matrix, and the first unit vector in the normalized adjacency matrix is ​​masked to obtain a second mask matrix.

2. The method according to claim 1, characterized in that The updating of the initial continuous vector according to the target circuit performance of the preset circuit function to obtain the target continuous vector includes: According to the initial continuous vector, a preset performance prediction model corresponding to the target circuit performance is used to perform performance prediction to obtain initial circuit performance parameters of the initial circuit topology diagram; updating the initial continuous vector according to the initial circuit performance parameter; According to the updated continuous vector, the preset performance prediction model is used to re-perform performance prediction until a preset iteration stop condition is reached, and the continuous vector when the preset iteration stop condition is reached is determined as the target continuous vector.

3. The method according to claim 1, characterized in that The countercurrent unit further comprises: a classification model, a coupling layer; Using the classification model to classify the second mask matrix to obtain a first classification matrix and a second classification matrix; The coupling layer is used to couple the first mask matrix, the first classification matrix and the second classification matrix to generate the initial processed adjacency matrix.

4. The method according to claim 2, characterized in that: The preset iteration stop condition is: reaching a preset number of iterations, or the circuit performance after the preset performance prediction model re-performs performance prediction to meet the target circuit performance.

5. The method according to claim 2, characterized in that: Before performing performance prediction based on the initial continuous vector and using a preset performance prediction model corresponding to the target circuit performance to obtain initial circuit performance parameters of the initial circuit topology diagram, the method further includes: According to the preset circuit function, a plurality of circuit topology diagrams and an adjacency matrix of the plurality of circuit topology diagrams are obtained; Performing device parameter tuning on the multiple circuit topologies to obtain circuit performance parameters of the multiple circuit topologies; Generate a training data set according to the adjacency matrices of the multiple circuit topology diagrams and the circuit performance parameters of the multiple circuit topology diagrams; The training data set is used to train an initial reversible flow model and an initial performance prediction model to obtain the reversible flow model and the performance prediction model.

6. The method according to claim 1, characterized in that The step of obtaining an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram according to a preset circuit function includes: According to the preset circuit function, randomly generate the initial circuit topology diagram, and obtain an initial adjacency matrix of the initial circuit topology diagram; or, According to the preset circuit function, the initial circuit topology graph is obtained from an existing circuit topology set corresponding to the preset circuit function, and an initial adjacency matrix of the initial circuit topology graph is obtained.

7. A circuit topology diagram generating device, characterized in that: The device comprises: An acquisition module is used to acquire an initial circuit topology diagram and an initial adjacency matrix of the initial circuit topology diagram according to a preset circuit function, wherein the initial circuit topology diagram is: a plurality of topology nodes and connections between the topology nodes, and the initial adjacency matrix includes: indication information of circuit devices between every two topology nodes in the plurality of topology nodes; A mapping module, used to map the initial adjacency matrix into an initial continuous vector using a preset reversible flow model; An updating module, configured to update the initial continuous vector according to the target circuit performance of the preset circuit function to obtain a target continuous vector; A restoration module, used to restore the target continuous vector to a target adjacency matrix using the reversible flow model; A determination module, used to determine that the circuit topology diagram corresponding to the target adjacency matrix is ​​the target circuit topology diagram of the preset circuit function; The reversible flow model includes: a normalization unit, a counterflow unit, and a connection unit; the mapping module is also used to use the normalization unit to normalize the parameters in the initial adjacency matrix to a preset parameter range to obtain a normalized adjacency matrix; use the counterflow unit to perform a first processing on the first unit vector in the normalized adjacency matrix to obtain an initial processed adjacency matrix; use the counterflow unit to continue to perform continuous processing on the second unit vector in the initial processed adjacency matrix until the number of processed unit vectors meets a preset number threshold; use the connection unit to generate the initial continuous vector according to the processed adjacency matrix when the number of processed unit vectors meets the preset number threshold; The upstream unit includes: a mask layer; the mapping module is also used to use the mask layer to mask other vectors except the first unit vector in the normalized adjacency matrix to obtain a first mask matrix, and mask the first unit vector in the normalized adjacency matrix to obtain a second mask matrix.

8. A computer device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to perform the steps of the circuit topology diagram method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the circuit topology diagram method according to any one of claims 1 to 6 are executed.