A method and device for business processing

The Jacobian matrix is ​​generated through analytical tools, which solves the problem of low accuracy of manual calculations in complex circuit analysis, and achieves more efficient and accurate circuit analysis.

CN118643786BActive Publication Date: 2024-11-22INTELLIGENT IMITATION TECHNOLOGY (ZHEJIANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411130872.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-22
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

In the prior art, when processing complex circuits, the accuracy of manually calculating the Jacobian matrix is ​​low and time-consuming, making it difficult to meet the accuracy requirements for circuit analysis.

Method used

By calling the preset analytical tool, analyzing the analytical circuit code is generated, and the solutions to the system of circuit equations are obtained to achieve more accurate and efficient circuit analysis.

Benefits of technology

It improves the accuracy and generation efficiency of Jacobian matrix, and can analyze complex circuits more accurately, reduce human resource consumption and reduce error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643786B_ABST
    Figure CN118643786B_ABST
Patent Text Reader

Abstract

The present specification discloses a method and device for business processing. The method comprises: obtaining a circuit diagram to be analyzed, determining a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed. Further, calling a preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group. And generating a Jacobian matrix based on the partial derivative results. Then, based on the Jacobian matrix, obtaining a solution to the circuit equation group, so as to perform business processing based on the solution to the circuit equation group.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system analysis, and in particular to a method and device for business processing. Background Art

[0002] In the study of circuit diagrams, node voltage analysis is a general technique for analyzing circuits. It treats each node in the circuit (except the reference node, whose potential is zero) as an unknown voltage, and establishes an equation for the unknown voltage based on Kirchhoff's current law to solve the equation to obtain the unknown voltage. By solving the voltage of each node in the circuit diagram, other unknown quantities in the circuit diagram, such as current and power, can be further solved. Then, based on the obtained voltage, current, power, etc., the performance of the circuit can be analyzed, such as evaluating whether the circuit is reliable and stable, checking whether the circuit meets the design requirements (such as whether it meets the voltage range, current limit, etc.), and a circuit simulation model can be established to predict the behavior characteristics of the circuit under different working conditions, providing a reference for practical applications. Among them, Kirchhoff's current law states that at any node in the circuit, at any time, the sum of the currents flowing into the node is equal to the sum of the currents flowing out of the node.

[0003] In actual circuit analysis, there may be many nodes and circuit elements, so it is necessary to establish a set of equations containing multiple unknowns, and there are as many equations as there are unknowns in the set of equations.

[0004] When the system of equations is nonlinear, the Newton-Raphson method is usually used to solve the system of equations. The Newton-Raphson method was proposed by Newton in the 17th century as a method for approximating solutions to equations in the real and complex domains. It is mainly used to find numerical solutions to nonlinear equations and is one of the commonly used iterative algorithms in mathematics and engineering.

[0005] When using the Newton-Raphson method to solve a nonlinear system of equations, you need to generate the Jacobian matrix first to linearize the nonlinear system of equations. The Jacobian matrix is ​​a matrix in which the first-order partial derivatives of each unknown in each equation of the nonlinear system are arranged in a certain way. In the Newton-Raphson method, it is used to calculate the correction amount at each iteration, that is, to select an initial value close to the true solution. In the case of , the initial value can be calculated through the Jacobian matrix The deviation from the new solution , to obtain new solutions , at this time Compare The iterative process is repeated until a certain convergence condition is met, and finally the solution of the nonlinear equation system is obtained.

[0006] However, when the Newton-Raphson method is currently used to solve the nonlinear equations corresponding to the circuit diagram, the Jacobian matrix can be completed by manual calculation, but for today's increasingly complex circuits, manual calculation has low accuracy and is time-consuming.

[0007] Based on this, how to improve the accuracy of generating Jacobian matrix so as to analyze the circuit more accurately is an urgent problem to be solved. Summary of the invention

[0008] This specification provides a business processing method and device to partially solve the above-mentioned problems existing in the prior art.

[0009] This manual adopts the following technical solutions:

[0010] This specification provides a business processing method, including:

[0011] Obtain the circuit diagram to be analyzed;

[0012] Determine a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed;

[0013] Calling a preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group;

[0014] Generate a Jacobian matrix according to the partial derivative results;

[0015] Obtaining a solution to the circuit equations according to the Jacobian matrix;

[0016] Business processing is performed according to the solution of the circuit equation group.

[0017] Optionally, determining the circuit code to be analyzed corresponding to the circuit diagram to be analyzed specifically includes:

[0018] Based on a preset modeling language and according to the circuit diagram to be analyzed, a circuit code to be analyzed is determined.

[0019] Optionally, calling a preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group specifically includes:

[0020] Calling a preset parsing tool to parse the circuit code to be analyzed to obtain variables, where the variables are unknown numbers in the circuit diagram to be analyzed;

[0021] For each equation of the circuit equation group, extract the coefficient corresponding to the variable in the equation by using a preset analytical tool;

[0022] When the exponent of the variable is a preset exponent, the coefficient corresponding to the variable in the equation is used as the partial derivative of the variable in the equation;

[0023] According to the partial derivative of the variable in each equation of the circuit equation group, the partial derivative result corresponding to the circuit equation group is determined.

[0024] Optionally, calling a preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group specifically includes:

[0025] Calling a preset parsing tool to parse the circuit code to be analyzed to obtain variables, where the variables are unknown numbers in the circuit diagram to be analyzed;

[0026] For each equation of the circuit equation group, extract the coefficient corresponding to the variable in the equation by using a preset analytical tool;

[0027] When the exponent of the variable is not a preset exponent, determining the partial derivative of the variable in the equation according to the coefficient corresponding to the variable in the equation, the exponent of the variable and the variable;

[0028] According to the partial derivative of the variable in each equation of the circuit equation group, the partial derivative result corresponding to the circuit equation group is determined.

[0029] Optionally, determining the circuit code to be analyzed corresponding to the circuit diagram to be analyzed specifically includes:

[0030] Identifying each electronic component included in the circuit diagram to be analyzed;

[0031] For each node included in the circuit diagram to be analyzed, determining an electronic component associated with the node;

[0032] Determine a circuit equation for the node according to the electronic components associated with the node;

[0033] According to the circuit equation of each node included in the circuit diagram to be analyzed, a circuit equation group corresponding to the circuit diagram to be analyzed is obtained, so as to determine the circuit code to be analyzed corresponding to the circuit diagram to be analyzed according to the circuit equation group.

[0034] Optionally, calling a preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group specifically includes:

[0035] Calling a preset parsing tool to parse the circuit code to be analyzed to determine the initial partial derivative results corresponding to the circuit equation group;

[0036] Performing an equivalent transformation on the circuit equation group corresponding to the circuit code to be analyzed to obtain a transformed circuit code;

[0037] The transformed circuit code is analyzed by the analysis tool to determine the partial derivative result corresponding to the circuit equation group corresponding to the transformed circuit code as a reference partial derivative result;

[0038] The partial derivative results corresponding to the circuit equation group are determined according to the reference partial derivative results and the initial partial derivative results.

[0039] This specification provides a service processing device, including:

[0040] An acquisition module, used for acquiring a circuit diagram to be analyzed;

[0041] A determination module, used to determine a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed;

[0042] An analysis module, used to call a preset analysis tool to analyze the circuit code to be analyzed and determine the partial derivative results corresponding to the circuit equation group;

[0043] A generation module, used for generating a Jacobian matrix according to the partial derivative result;

[0044] An obtaining module, used for obtaining a solution of the circuit equation group according to the Jacobian matrix;

[0045] An execution module is used to execute business processing according to the solution of the circuit equation group.

[0046] Optionally, the determination module is specifically configured to determine the circuit code to be analyzed according to the circuit diagram to be analyzed based on a preset modeling language.

[0047] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned business processing method is implemented.

[0048] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned business processing method when executing the program.

[0049] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0050] In the business processing method provided in this specification, a circuit diagram to be analyzed is obtained, and a circuit code to be analyzed corresponding to the circuit diagram to be analyzed is determined, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed. Further, a preset parsing tool is called to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group. And based on the partial derivative results, a Jacobian matrix is ​​generated. Then, based on the Jacobian matrix, a solution to the circuit equation group is obtained, so that business processing is performed based on the solution to the circuit equation group.

[0051] It can be seen from the above method that in the business processing method provided in this specification, by calling the preset parsing tool, the circuit code to be analyzed is parsed to generate the Jacobian matrix, so that there is no need to manually calculate the Jacobian matrix, saving human resources. In addition, the current circuits are becoming more and more complex, and manual calculations are time-consuming and have a high error rate. However, this method can improve the accuracy of the generated Jacobian matrix to a certain extent, and at the same time greatly improve the efficiency of generating the Jacobian matrix, and then the solution of the circuit equation group can be obtained according to the accurate Jacobian matrix to correctly analyze the circuit. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0053] Figure 1 A flowchart of a business processing method provided in this specification;

[0054] Figure 2 A schematic diagram of a circuit diagram to be analyzed provided in this specification;

[0055] Figure 3 A schematic diagram of a circuit code to be analyzed provided in this specification;

[0056] Figure 4 A schematic diagram of a device for business processing provided in this specification;

[0057] Figure 5 A method provided in this specification corresponding to Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0059] In the study and analysis of circuit diagrams, a set of equations containing unknowns in the circuit diagram is established through the node voltage method. When solving this set of equations, the Newton-Raphson method is usually used.

[0060] The Newton-Raphson method is based on the Taylor series expansion and uses the first-order derivative information of a function at a certain point to approximate the root of the function. For example, suppose the nonlinear equation is , choose an initial value close to the true solution , and then approximate the equation by Taylor series expansion and taking the linear part, thus obtaining a new solution , this new solution is usually closer to the true root than the initial value. The iterative process is repeated until a certain convergence condition is met.

[0061] If the Newton-Raphson method is used to solve the nonlinear equations, the Jacobian matrix can be generated to linearize the nonlinear equations. Currently, when the Newton-Raphson method is used to solve the nonlinear equations corresponding to the circuit diagram, the Jacobian matrix can be calculated manually. However, for today's increasingly complex circuits, manual calculation has low accuracy, is time-consuming, and is inefficient.

[0062] Based on this, this specification provides a method for business processing, obtaining a circuit diagram to be analyzed, determining a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed. Further, a preset parsing tool is called to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group. And based on the partial derivative results, a Jacobian matrix is ​​generated. Then, based on the Jacobian matrix, a solution to the circuit equation group is obtained, so as to perform business processing based on the solution to the circuit equation group.

[0063] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0064] Figure 1 A flowchart of a business processing method provided in this specification includes the following steps:

[0065] S101: Obtain a circuit diagram to be analyzed.

[0066] In this specification, the execution entity for implementing a business processing method can be a terminal device such as a laptop computer, a tablet computer, or, of course, a server. For the sake of ease of description, this specification only takes the server as the execution entity as an example to illustrate a business processing method provided in this specification.

[0067] The server can first obtain the circuit diagram to be analyzed. The circuit diagram to be analyzed here can be a circuit diagram corresponding to a real circuit, or a circuit diagram corresponding to a circuit displayed in the form of circuit simulation. Circuit simulation refers to the technology of simulating and analyzing circuit behavior using computer software. Users can use commonly used circuit simulation software (such as Multisim, OrCAD PSpice, LTspice, etc.) to simulate the real circuit. The circuit diagrams provided in this manual are as follows: Figure 2 shown.

[0068] Figure 2 A schematic diagram of a circuit diagram to be analyzed provided in this specification.

[0069] from Figure 2 It can be seen that there are two circuit elements in the circuit diagram to be analyzed, namely resistance R and inductance L, three nodes P1, P2, and P3, and the current in the circuit is i.

[0070] S102: Determine a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed.

[0071] The server determines the circuit code to be analyzed corresponding to the circuit diagram to be analyzed, and the circuit equation group can be specifically expressed as:

[0072]

[0073] in, Representing the first equation, Representing the second equation, Represent the third equation.

[0074] Specifically, the server can determine the circuit code to be analyzed based on the circuit diagram to be analyzed based on the preset modeling language. For example, the server can input the circuit diagram to be analyzed into the large language model, and also input the question statement into the large language model, wherein the question statement may include which modeling language is given to determine the circuit code to be analyzed of the circuit diagram to be analyzed. Figure 2 The circuit diagram to be analyzed is explained in Figure 2 The circuit code to be analyzed corresponding to the circuit diagram to be analyzed is as follows Figure 3 shown.

[0075] Figure 3A schematic diagram of a circuit code to be analyzed provided in this specification.

[0076] from Figure 3 As can be seen from the figure, the modeling language here can be a modeling language such as Modelica, where Modelica is an open, object-oriented, equation-based computer language that is particularly suitable for modeling complex physical systems across different fields. Using the above example, in the circuit code to be analyzed determined based on Modelica, R and L are known numbers, R represents the resistance value of resistor R, L represents the inductance value of inductor L, U1, U2, U3, is an unknown number, U1, U2, and U3 are the voltages corresponding to P1, P2, and P3 respectively. is the magnetic flux of the inductor L. Figure 3 The circuit code to be analyzed shown in also includes the circuit equation group corresponding to the circuit diagram to be analyzed. Because there are four unknowns, the four equations corresponding to the circuit equation group are ; ; ; These four equations are based on Kirchhoff's current law, Ohm's law ( )、Basic formula of inductance( )、Inductor voltage calculation formula( ) are established for P1, P2, P3 and inductor L respectively.

[0077] It should be noted that, in the process of determining the circuit code to be analyzed corresponding to the circuit diagram to be analyzed, the server can first identify the electronic components contained in the circuit diagram to be analyzed, and determine the electronic component associated with each node contained in the circuit diagram to be analyzed. Then, the server determines the circuit equation for the node based on the electronic component associated with the node. Further, the server obtains the circuit equation group corresponding to the circuit diagram to be analyzed based on the circuit equation of each node contained in the circuit diagram to be analyzed, so as to determine the circuit code to be analyzed corresponding to the circuit diagram to be analyzed based on the circuit equation group.

[0078] For example, when there are four electronic components (such as resistors, inductors, etc.) in a circuit diagram to be analyzed and three nodes are specified, the server identifies each electronic component contained in the circuit diagram to be analyzed, and then, for each node in the circuit diagram to be analyzed, determines the electronic component associated with the node. The server determines the circuit equation for the node based on the electronic component associated with the node. Further, the server determines the circuit equation corresponding to each node, and then obtains the circuit equation group corresponding to the circuit diagram to be analyzed, so as to determine the circuit code to be analyzed corresponding to the circuit diagram to be analyzed based on the circuit equation group, where the circuit code to be analyzed may include the circuit equation group and the unknowns and knowns in the circuit equation group.

[0079] It should also be noted that the circuit code to be analyzed here can be obtained by the server based on the circuit diagram to be analyzed, or it can be manually written. Specifically, the unknowns and knowns in the circuit diagram to be analyzed can be determined manually based on the circuit diagram to be analyzed, so as to further determine the circuit equation group corresponding to the circuit diagram to be analyzed.

[0080] S103: calling a preset parsing tool to parse the circuit code to be analyzed to determine partial derivative results corresponding to the circuit equation group.

[0081] The server calls the interface of the preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group. Specifically, the server can parse the circuit code to be analyzed through the preset parsing tool to obtain variables, where the variables are unknown numbers in the circuit diagram to be analyzed. Using the above example, the variables are U1, U2, U3, .

[0082] Furthermore, the server uses a preset parsing tool to extract the coefficient corresponding to the variable in each equation of the circuit equation group, and when the exponent of the variable is a preset exponent, the coefficient corresponding to the variable in the equation is used as the partial derivative of the variable in the equation. Then, the server determines the partial derivative result corresponding to the circuit equation group according to the partial derivative of the variable in each equation of the circuit equation group.

[0083] Using the above example, the circuit equations are:

[0084]

[0085] When the variable is U1, the coefficient of U1 in the first equation is , the coefficient of U1 in the second equation is 0, and the coefficient of U1 in the third equation is , the coefficient of U1 in the fourth equation is 0; when the variable is U2, the coefficient of U2 in the first equation is 0, the coefficient of U2 in the second equation is 0, the coefficient of U2 in the third equation is 0, and the coefficient of U2 in the fourth equation is 1; when the variable is U3, the coefficient of U3 in the first equation is , the coefficient of U3 in the second equation is 0, and the coefficient of U3 in the third equation is , the coefficient of U3 in the fourth equation is -1; when the variable is hour, The coefficient in the first equation is 0, The coefficients in the second equation are , The coefficients in the third equation are , The coefficients in the fourth equation are .

[0086] When the preset index is 1, the exponents of the above four variables are all preset exponents. Therefore, the server uses each coefficient of each of the above variables as a partial derivative, and determines the partial derivative results corresponding to the circuit equation group based on the partial derivatives.

[0087] When the exponent of the variable is not a preset exponent, the partial derivative of the variable in the equation is determined based on the coefficient corresponding to the variable in the equation, the exponent of the variable, and the variable. Specifically, when the exponent of the variable is not a preset exponent (such as the exponent of the variable is k), the partial derivative of the variable in the equation is the product of the coefficient corresponding to the variable in the equation, the (k-1)th power of the variable, and k. Then, based on the partial derivative of the variable in each equation of the circuit equation group, the partial derivative result corresponding to the circuit equation group is determined. For example, if there is a variable a, and the exponent of a in a certain equation is 3 and the coefficient is 2, then the partial derivative of the variable a in the equation is .

[0088] It should be noted that the above-mentioned preset parsing tool can be an extended grammar parsing tool, etc., wherein, in this method, the grammar parsing tool can be ANTLR4, which is a powerful parser generator that uses a grammar description language similar to BNF (Backus-Naur Form) (EBNF, Extended Backus-Naur Form) to define the structure of the input text and automatically generate code that can recognize, parse and construct a custom language structure. ANTLR4 is widely used in the fields of programming language parsing, data format conversion, natural language processing, and compiler and interpreter construction.

[0089] The method in this specification can implement the parsing of the circuit code to be analyzed by calling the interface of ANTLR4.

[0090] It should also be noted that ANTLR4 can not only extract variables in the circuit code to be analyzed, but also extract parameters in the circuit code to be analyzed, that is, known numbers in the circuit diagram to be analyzed. The server extracts the variables and parameters in the circuit code to be analyzed by calling the ANTLR4 interface, and stores the variables and parameters so as to generate the Jacobian matrix later.

[0091] In addition, in order to make the obtained partial derivative results more accurate, the server can verify the obtained partial derivative results. Specifically, the server calls a preset parsing tool to parse the circuit code to be analyzed to determine the initial partial derivative results corresponding to the circuit equation group. Then, the circuit equation group corresponding to the circuit code to be analyzed is equivalently transformed to obtain the transformed circuit code, and the transformed circuit code is parsed by the parsing tool to determine the partial derivative results corresponding to the circuit equation group corresponding to the transformed circuit code as the reference partial derivative results.

[0092] The server determines the partial derivative results corresponding to the circuit equation group based on the reference partial derivative results and the initial partial derivative results. For example, when the reference partial derivative results are the same as the initial partial derivative results, the reference partial derivative results or the initial partial derivative results are directly used as the partial derivative results corresponding to the circuit equation group. When the reference partial derivative results are inconsistent with the initial partial derivative results, it means that one or both of the reference partial derivative results and the initial partial derivative results may be wrong. At this time, the server can prompt the user that the partial derivative result calculation error is re-invoked, and the preset parsing tool is re-invoked to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group. Among them, the equivalent transformation of equations is a common operation in mathematics. It refers to the transformation of an equation into another equivalent equation through a series of legal mathematical operations (such as addition, subtraction, multiplication, division, shifting terms, merging like terms, etc.). The key here is "equivalence", that is, the two equations have the same solution set.

[0093] S104: Generate a Jacobian matrix according to the partial derivative results.

[0094] The server generates a Jacobian matrix based on the partial derivative results. Specifically, the server sorts the partial derivatives of each variable in each equation of the circuit equation group in a set order to obtain the Jacobian matrix.

[0095] Continuing with the above example, the Jacobian matrix can be expressed as:

[0096]

[0097] Among them, the first column is the partial derivatives of variable U1 in the four equations, the second column is the partial derivatives of variable U2 in the four equations, the third column is the partial derivatives of variable U3 in the four equations, and the fourth column is the partial derivatives of variable The corresponding partial derivatives in the four equations.

[0098] The process of generating the Jacobian matrix by calling the preset parsing tool can also be expressed as:

[0099]

[0100] in, represents the Jacobian matrix, represents the first equation in the circuit system, represents the second equation in the circuit system, represents the Nth equation in the circuit equation system, represents variable 1, represents variable 2, Represents the variable N. It means that the first equation takes partial derivative with respect to variable 1. It means that the Nth equation takes partial derivative with respect to variable N, and the rest of the formulas are the same.

[0101] Continuing with the above example, when the circuit equations are When , the Jacobian matrix can be expressed as:

[0102]

[0103] in, It means that the partial derivative of the first equation with respect to U1 is obtained. It means that the partial derivative of the first equation with respect to U2 is obtained. It means that the partial derivative of the first equation with respect to U3 is obtained. The first equation is Find the partial derivative, and the rest of the formulas are similar.

[0104] S105: Obtaining a solution to the circuit equation group according to the Jacobian matrix.

[0105] Furthermore, after obtaining the Jacobian matrix, the circuit equations are solved according to the Jacobian matrix.

[0106] Specifically, if the one-dimensional nonlinear equation , the unknown number is x, first select the initial guess value x0, that is, provide an initial guess value as the starting point of the iterative process. Then, the Jacobian matrix J is obtained according to the above method k , where J k is the current approximate solution x in each iteration k If the current iteration is the first iteration, the Jacobian matrix at the current approximate solution x0 is J0. Further, calculate x k and the next approximate solution x k+1 The difference between , to get . Determine the approximate solution x k+1 Whether the predetermined convergence conditions are met, for example, check Is it less than a certain threshold? If the condition is met, the iteration ends; otherwise, the iteration continues.

[0107] S106: Execute business processing according to the solution of the circuit equation group.

[0108] After obtaining the solution to the circuit equations, the server performs business processing. Specifically, the server obtains the solution to the equations, that is, the server obtains the solution to the circuit diagram to be analyzed, including the voltage, current or other relevant parameters of each node in the circuit diagram to be analyzed. The server can perform circuit performance analysis based on these solutions, such as evaluating the steady-state performance of the circuit (current distribution, power consumption, etc.); the server can also perform circuit fault diagnosis based on these solutions, such as identifying potential fault points in the circuit by comparing actual measured values ​​with calculated values; the server can also establish a circuit simulation model based on these solutions to predict the behavioral characteristics of the circuit under different working conditions, providing a reference for practical applications.

[0109] In this specification, the Jacobian matrix can be generated by parsing the circuit code to be analyzed corresponding to the circuit diagram to be analyzed. Compared with manually calculating the Jacobian matrix, this method can obtain a more accurate and efficient Jacobian matrix when analyzing complex circuits. Therefore, a more accurate solution to the circuit equation group can be obtained, and the circuit can be accurately analyzed to perform business processing.

[0110] Furthermore, when the circuit code to be analyzed is analyzed by a preset analysis tool, the coefficients of the unknowns can be directly extracted, and then the partial derivatives for the unknowns can be further obtained to determine the Jacobian matrix. The Jacobian matrix is ​​formed by arranging the partial derivatives in a set order.

[0111] After obtaining the Jacobian matrix, the circuit equations can be further solved based on the Jacobian matrix. Because the generated Jacobian matrix is ​​more accurate than manual calculations, a more accurate solution will be obtained in the subsequent calculation of the circuit equations.

[0112] The above are one or more business processing methods of this specification. Based on the same idea, this specification also provides corresponding business processing devices, such as Figure 4 shown.

[0113] Figure 4 A schematic diagram of a service processing device provided in this specification, including:

[0114] An acquisition module 401 is used to acquire a circuit diagram to be analyzed;

[0115] A determination module 402 is used to determine a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed;

[0116] The analysis module 403 is used to call a preset analysis tool to analyze the circuit code to be analyzed and determine the partial derivative results corresponding to the circuit equation group;

[0117] A generating module 404 is used to generate a Jacobian matrix according to the partial derivative result;

[0118] Obtaining module 405, for obtaining a solution of the circuit equation system according to the Jacobian matrix;

[0119] The execution module 406 is used to execute business processing according to the solution of the circuit equation group.

[0120] Optionally, the determination module 402 is specifically configured to determine the circuit code to be analyzed according to the circuit diagram to be analyzed based on a preset modeling language.

[0121] Optionally, the analysis module 403 is specifically used to call a preset analysis tool to parse the circuit code to be analyzed to obtain variables, where the variables are unknowns in the circuit diagram to be analyzed; for each equation of the circuit equation group, extract the coefficient corresponding to the variable in the equation through a preset analysis tool; when the exponent of the variable is a preset exponent, use the coefficient corresponding to the variable in the equation as the partial derivative of the variable in the equation; and determine the partial derivative result corresponding to the circuit equation group based on the partial derivative of the variable in each equation of the circuit equation group.

[0122] Optionally, the analysis module 403 is specifically used to call a preset analysis tool to parse the circuit code to be analyzed to obtain variables, where the variables are unknowns in the circuit diagram to be analyzed; for each equation of the circuit equation group, extract the coefficient corresponding to the variable in the equation through a preset analysis tool; when the exponent of the variable is not a preset exponent, determine the partial derivative of the variable in the equation based on the coefficient corresponding to the variable in the equation, the exponent of the variable and the variable; determine the partial derivative result corresponding to the circuit equation group based on the partial derivative of the variable in each equation of the circuit equation group.

[0123] Optionally, the determination module 402 is specifically used to identify each electronic component included in the circuit diagram to be analyzed; for each node included in the circuit diagram to be analyzed, determine the electronic component associated with the node; based on the electronic component associated with the node, determine the circuit equation for the node; based on the circuit equation of each node included in the circuit diagram to be analyzed, obtain a circuit equation group corresponding to the circuit diagram to be analyzed, so as to determine the circuit code to be analyzed corresponding to the circuit diagram to be analyzed based on the circuit equation group.

[0124] Optionally, the analysis module 403 is specifically used to call a preset analysis tool to analyze the circuit code to be analyzed to determine the initial partial derivative results corresponding to the circuit equation group; perform an equivalent transformation on the circuit equation group corresponding to the circuit code to be analyzed to obtain the transformed circuit code; use the analysis tool to analyze the transformed circuit code to determine the partial derivative results corresponding to the circuit equation group corresponding to the transformed circuit code as reference partial derivative results; determine the partial derivative results corresponding to the circuit equation group based on the reference partial derivative results and the initial partial derivative results.

[0125] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A business processing method is provided.

[0126] This manual also provides Figure 5 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 5 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0127] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0128] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.

[0129] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0130] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0131] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0132] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0135] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0136] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0137] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0138] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0139] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0140] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0141] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0142] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A business processing method, characterized in that: include: Obtain the circuit diagram to be analyzed; Determine a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed; Calling a preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group, wherein the preset parsing tool is called to parse the circuit code to be analyzed to obtain variables, and for each equation of the circuit equation group, the coefficient corresponding to the variable in the equation is extracted by the preset parsing tool, and when the exponent of the variable is a preset exponent, the coefficient corresponding to the variable in the equation is used as the partial derivative of the variable in the equation, and when the exponent of the variable is not the preset exponent, the partial derivative of the variable in the equation is determined according to the coefficient corresponding to the variable in the equation, the exponent of the variable and the variable, and the partial derivative results corresponding to the circuit equation group are determined according to the partial derivative of the variable in each equation of the circuit equation group, and the variable is an unknown number in the circuit diagram to be analyzed; Generate a Jacobian matrix according to the partial derivative results; Obtaining a solution to the circuit equations according to the Jacobian matrix; Business processing is performed according to the solution of the circuit equation group.

2. The method according to claim 1, characterized in that Determining the circuit code to be analyzed corresponding to the circuit diagram to be analyzed specifically includes: Based on a preset modeling language and according to the circuit diagram to be analyzed, a circuit code to be analyzed is determined.

3. The method according to claim 1, characterized in that Determining the circuit code to be analyzed corresponding to the circuit diagram to be analyzed specifically includes: Identifying each electronic component included in the circuit diagram to be analyzed; For each node included in the circuit diagram to be analyzed, determining an electronic component associated with the node; Determine a circuit equation for the node according to the electronic components associated with the node; According to the circuit equation of each node contained in the circuit diagram to be analyzed, a circuit equation group corresponding to the circuit diagram to be analyzed is obtained, so as to determine the circuit code to be analyzed corresponding to the circuit diagram to be analyzed according to the circuit equation group.

4. The method according to claim 1, characterized in that Calling a preset parsing tool to parse the circuit code to be analyzed to determine the partial derivative results corresponding to the circuit equation group, specifically including: Calling a preset parsing tool to parse the circuit code to be analyzed to determine the initial partial derivative results corresponding to the circuit equation group; Performing an equivalent transformation on the circuit equation group corresponding to the circuit code to be analyzed to obtain a transformed circuit code; The transformed circuit code is analyzed by the analysis tool to determine the partial derivative result corresponding to the circuit equation group corresponding to the transformed circuit code as a reference partial derivative result; The partial derivative results corresponding to the circuit equation group are determined according to the reference partial derivative results and the initial partial derivative results.

5. A device for business processing, characterized in that: include: An acquisition module, used for acquiring a circuit diagram to be analyzed; A determination module, used to determine a circuit code to be analyzed corresponding to the circuit diagram to be analyzed, wherein the circuit code to be analyzed includes a circuit equation group corresponding to the circuit diagram to be analyzed; A parsing module, used for calling a preset parsing tool, parsing the circuit code to be analyzed, and determining the partial derivative results corresponding to the circuit equation group, wherein the preset parsing tool is called to parse the circuit code to be analyzed to obtain variables, and for each equation of the circuit equation group, the coefficient corresponding to the variable in the equation is extracted by the preset parsing tool, when the exponent of the variable is a preset exponent, the coefficient corresponding to the variable in the equation is used as the partial derivative of the variable in the equation, when the exponent of the variable is not the preset exponent, the partial derivative of the variable in the equation is determined according to the coefficient corresponding to the variable in the equation, the exponent of the variable and the variable, and the partial derivative results corresponding to the circuit equation group are determined according to the partial derivative of the variable in each equation of the circuit equation group, and the variable is an unknown number in the circuit diagram to be analyzed; A generation module, used for generating a Jacobian matrix according to the partial derivative result; An obtaining module, used for obtaining a solution of the circuit equation group according to the Jacobian matrix; An execution module is used to execute business processing according to the solution of the circuit equation group.

6. The device according to claim 5, characterized in that The determination module is specifically used to determine the circuit code to be analyzed based on a preset modeling language and according to the circuit diagram to be analyzed.

7. 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 method described in any one of claims 1 to 4 is implemented.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 4 is implemented.