Constraint conflict elimination method and device of constraint system and storage medium

By analyzing the Jacob and maximum matching technology, the over -constraint set of the over -determining and removing the restraint system is automatically determined and removing the complicated problems of artificial identification conflicts in existing technologies, and the efficiency and effect of restraint conflict elimination are improved.

CN119378043APending Publication Date: 2025-01-28SHENZHEN POISSON SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411968370.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

When excluding conflicts in constraint systems, the prior art requires manual identification of which constraints exist between the conflicts. The process is cumbersome and difficult, especially when the over-constraint set is huge.

Method used

By determining whether the initial constraint system is solved, if there is a solution, analyze the first Jacob's matrix to determine the binding set; if there is no solution, it will be transformed into a variable size or two -drawing. And automatically remove any constraint.

Benefits of technology

It significantly improves the efficiency and effectiveness of constraints, reducing the difficulty of artificial correlation, especially in the complex constraint system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378043A_ABST
    Figure CN119378043A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data analysis, and provides a constraint conflict elimination method for a constraint system, and the method comprises the steps: judging whether an initial constraint system has a solution or not; if the initial constraint system has a solution, determining an over-constraint subset of the initial constraint system by analyzing the first Jacobian matrix; if the initial constraint system has no solution, converting the size in the initial constraint system into a variable size; if the constraint system converted into the variable size has a solution, determining an over-constraint subset of the initial constraint system by analyzing a second Jacobian matrix; if the constraint system converted into the variable size has no solution, converting the initial constraint system into a bipartite graph; performing maximum flow matching on constraint nodes in the bipartite graph, and determining an over-constraint subset of the initial constraint system in the process of iteratively searching for an expansion path; and any constraint is removed from the over-constraint subset. According to the technical scheme, the constraint conflict elimination efficiency and effect can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, and in particular to a method, device, and storage medium for eliminating constraint conflicts in a constraint system. Background Technology

[0002] A constraint system is a system consisting of graphics (such as points, lines, circles, etc.) and constraints added between the graphics (such as parallelism, coincidence, distance, etc.). Among them, the various constraints added to the graphics may be contradictory (e.g., two lines are both parallel and perpendicular) or redundant (e.g., a point coincides with a line and the distance from the point to the line is zero). This situation is called constraint conflict.

[0003] Currently, various constraint solving engines, both domestic and international, offer state analysis capabilities, which can generate an over-constraint set containing all conflicting constraints. However, if users want to eliminate these conflicting constraints, they need to manually identify which constraints the conflict exists between. When the over-constraint set is large, this process is extremely tedious and difficult. Summary of the Invention

[0004] This application provides a method, device, and storage medium for eliminating constraint conflicts in a constraint system, which can significantly improve the efficiency and effectiveness of eliminating constraint conflicts.

[0005] On the one hand, this application provides a constraint conflict elimination method for a constraint system, the method comprising: Determine if the initial constraint system has a solution; If the initial constraint system has a solution, then the solution is determined by analyzing the first Jacobian matrix. The over-constrained subset of the initial constraint system, where the first Jacobian matrix is ​​the Jacobian matrix corresponding to the system of equations obtained by constraint transformation in the solvable constraint system; If the initial constraint system has no solution, then the dimensions in the initial constraint system are converted into variable dimensions; If the constraint system has been transformed into a solvable variable-size constraint system, then the over-constrained subset of the initial constraint system is determined by analyzing the second Jacobian matrix. The second Jacobian matrix is ​​the Jacobian matrix corresponding to the equation system obtained by the constraint transformation in the variable-size solvable constraint system. If there is no solution after the initial constraint system has been converted into a variable-size constraint system, then the initial constraint system is converted into a bipartite graph, which includes constraint nodes. Maximum flow matching is performed on the constraint nodes in the bipartite graph, and the over-constrained subset of the initial constraint system is determined during the iterative search for the expansion path. Remove any one constraint from the aforementioned constrained subset.

[0006] On the other hand, this application provides a constraint conflict elimination device for a constraint system, the device comprising: The decision module is used to determine whether the initial constraint system has a solution; The first determining module is used to determine the over-constrained subset of the initial constraint system by analyzing the first Jacobian matrix if the initial constraint system has a solution. The first Jacobian matrix is ​​the Jacobian matrix corresponding to the system of equations obtained by constraint transformation in the solvable constraint system. The first conversion module is used to convert the dimensions in the initial constraint system into variable dimensions if the initial constraint system has no solution. The second determining module is used to determine the over-constrained subset of the initial constraint system by analyzing the second Jacobian matrix if the constraint system that has been transformed into a variable-size constraint system has a solution. The second Jacobian matrix is ​​the Jacobian matrix corresponding to the set of equations obtained by the constraint transformation in the variable-size constraint system with a solution. The second transformation module is used to transform the initial constraint system into a bipartite graph if there is no solution after it has been transformed into a variable-size constraint system. The bipartite graph includes constraint nodes. The third determining module is used to perform maximum flow matching on the constraint nodes in the bipartite graph and determine the over-constrained subset of the initial constraint system during the iterative search for the expansion path. The deletion module is used to remove any constraint from the over-constraint subset.

[0007] Thirdly, this application provides an electronic device, the device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the constraint conflict elimination method of the constraint system described above.

[0008] Fourthly, this application provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the constraint conflict elimination method of the constraint system described above.

[0009] As can be seen from the technical solution provided in this application, after determining that the constraint system has a solution, the over-constrained subset of the constraint system is determined by analyzing the Jacobian matrix corresponding to the equations obtained from the constraint transformation in the solvable constraint system. After determining that the constraint system transformed into a variable-size constraint system has no solution, the initial constraint system is transformed into a bipartite graph, and maximum flow matching is performed on the constraint nodes in the bipartite graph. During the iterative search for the expansion path, the over-constrained subset of the constraint system is determined. Since the above process can be automatically completed by a computer program, by implementing the calculation of the over-constrained subset in the constraint solving engine, the over-constrained subset helps users save the process of manually identifying which constraints conflict exist. This not only reduces the difficulty of eliminating constraint conflicts but also greatly improves the efficiency of users in eliminating constraint conflicts. For complex constraint systems, this processing method is even more efficient and effective. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart of the constraint conflict elimination method of the constraint system provided in the embodiments of this application; Figure 2 This is a schematic diagram of a constraint system provided in an embodiment of this application; Figure 3 The embodiments provided in this application correspond to Figure 2 The example system of equations for a constrained system; Figure 4 The embodiments provided in this application will Figure 2 The Jacobian matrix corresponding to the system of equations obtained by constraint transformation in the example constraint system; Figure 5 This application provides an embodiment of the equations that transform the dimensions in an unsolvable constraint system into a system of equations with variable dimensions. Figure 6 The embodiments provided in this application correspond to Figure 5 The matrix of the example system of equations; Figure 7 This application provides an embodiment of the method for... Figure 6 The example matrix is ​​the matrix after row echelon reduction; Figure 8 This is a schematic diagram of the actual constraint system provided in the embodiments of this application; Figure 9 This is a schematic diagram of a two-part diagram of the constraint system provided in an embodiment of this application; Figure 10 This is a schematic diagram illustrating the generation of the constrained subset 1 provided in an embodiment of this application; Figure 11 This is a schematic diagram illustrating the generation of the constrained subset 2 provided in an embodiment of this application; Figure 12 This is a schematic diagram of the constraint conflict elimination device of the constraint system provided in the embodiments of this application; Figure 13 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] In this specification, adjectives such as "first" and "second" are used only to distinguish one element or action from another, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element or component or step (etc.) should not be construed as being limited to only one of the elements, components, or steps, but may be one or more of the elements, components, or steps, etc.

[0014] For ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn to actual scale.

[0015] A constraint system is a system composed of geometric figures (such as points, lines, and circles) and constraints added between the figures (such as parallelism, coincidence, and distance). The various constraints added to the figures may be contradictory (e.g., two lines are both parallel and perpendicular) or redundant (e.g., a point coincides with a line and the distance from the point to the line is zero). This situation is called constraint conflict. Currently, various constraint solving engines, both domestic and international, provide state analysis functions, which can provide an over-constraint set containing all conflicting constraints. However, if users want to eliminate these conflicting constraints, they need to manually identify which constraints the conflict exists between. When the over-constraint set is large, this process is extremely tedious and difficult.

[0016] To address the aforementioned problems in the prior art, this application proposes a constraint conflict elimination method for a constraint system, the flowchart of which is attached. Figure 1 As shown, the main steps include S101 to S106, which are detailed below: Step S101: Determine whether the initial constraint system has a solution.

[0017] In this field, a solvable constraint system means that, under given constraints, there exists at least one combination of variable values ​​that satisfies all constraints. In other words, a solvable constraint system has a feasible solution space, meaning that the range of variable values ​​does not conflict with the constraints, and a solution satisfying all conditions can be found. Conversely, a solvable constraint system means that no combination of variable values ​​can satisfy all constraints. There are many reasons why a constraint system may be solvable. Typically, a solvable constraint system is due to conflicts between constraints. For example, one constraint requires the value of variable x to be less than 5, while another constraint requires x to be greater than or equal to 5. In this case, the system cannot satisfy the two contradictory constraints. In the embodiments of this application, determining whether a constraint system has a solution can be achieved through feasibility analysis, including graph theory-based analysis, local consistency checks, algebraic methods, and solver methods, etc. This application does not limit the specific implementation method. In this embodiment of the application, before determining whether the constraint system has a solution, the constraint system can be decomposed into several sub-constraint systems that do not conflict with each other; after determining the over-constrained subset of each sub-constraint system that does not conflict with each other, all over-constrained subsets of the several sub-constraint systems are merged. The criterion for determining that there is no constraint conflict among the sub-systems is that there is no constraint relationship between the graphs of each sub-system.

[0018] Step S102: If the initial constraint system has a solution, then the over-constrained subset of the initial constraint system is determined by analyzing the first Jacobian matrix, where the first Jacobian matrix is ​​the Jacobian matrix corresponding to the system of equations obtained by constraint transformation in the solvable constraint system.

[0019] If the initial constraint system has a solution, the constraints in the initial constraint system are transformed into a system of equations. The structure of the initial constraint system is then analyzed using the Jacobian matrix. The Jacobian matrix describes how constraint functions affect variable changes; it is the core of the constraint system. By analyzing the linear independence of the row vectors in the Jacobian matrix, we can determine which constraints are conflicting, thus forming an over-constrained subset. To distinguish it from subsequent Jacobian matrices, this Jacobian matrix is ​​called the first Jacobian matrix, that is, the Jacobian matrix corresponding to the system of equations obtained from the transformation of constraints in the solvable constraint system. The Jacobian matrix corresponding to the system of equations obtained from the transformation of constraints in the solvable constraint system can be obtained by: expressing the constraint system as a vector function; calculating the partial derivatives of each constraint function in the system of equations to obtain the Jacobian matrix. For example... Figure 2 The diagram shown is a schematic of a constraint system provided in an embodiment of this application, wherein the angle dimension is 0, the distance dimension is also 0, and the constraint direction and constraint alignment direction of each constraint are arbitrary. Figure 3 yes Figure 2The example constraint system corresponds to the system of equations, which, from top to bottom in the diagram, represent horizontal constraints, parallel constraints, coincident constraints, and distance constraints, respectively. Angular constraints. The angle between lines l1 and l2 The distances from lines l1 and l2 to the origin of the coordinate system. : The vector from the origin of the coordinate system to point p. : The normal vectors of lines l1 and l2.

[0020] As an embodiment of this application, determining the over-constrained subset of the initial constraint system by analyzing the first Jacobian matrix can be achieved through steps S1021 to S1023, as detailed below: Step S1021: Find the largest linearly independent set of row vectors by performing row rank analysis on the first Jacobian matrix.

[0021] The row vectors of the Jacobian matrix represent the gradients of each constraint function with respect to the variables; they reflect, in a sense, the direction and influence of the constraint functions in the solution space. By performing row rank analysis on the first Jacobian matrix—for example, through Gaussian elimination, determinant calculation, or singular value decomposition—the maximal linearly independent set of its row vectors can be found. Figure 4 As shown, is Figure 2 The Jacobian matrix corresponding to the equation system obtained by the constraint transformation in the example constraint system is shown in the figure from top to bottom. The row vectors represent horizontal constraints, parallel constraints, coincidence constraints, distance constraints, and angular constraints, respectively. The rectangle encloses the largest linearly independent set of row vectors in the Jacobian matrix.

[0022] Step S1022: Determine row by row whether each row vector outside the maximum linearly independent set is linearly dependent on the basis vectors in the maximum linearly independent set.

[0023] The constraints corresponding to the maximally linearly independent set of row vectors are fundamental constraints. These constraints are necessary in the solution space and cannot be expressed by other constraints. The remaining constraints (i.e., constraints not within the maximally linearly independent set) conflict with the fundamental constraints, but they can be expressed as some form of these fundamental constraints through linear combinations. Therefore, by determining row by row whether each row vector outside the maximally linearly independent set is linearly dependent on the basis vectors within the maximally linearly independent set, we can determine whether an over-constrained subset exists. Specifically, for each row in the first Jacobian matrix (corresponding to one constraint), we determine whether each row vector outside the maximally linearly independent set is linearly dependent on the basis vectors within the maximally linearly independent set by solving a system of linear equations or using the inner product of row vectors.

[0024] Step S1023: If each row vector outside the maximally linearly independent set has a row vector Vr that is linearly dependent on the basis vectors in the maximally linearly independent set, then the row vector Vr and the basis vectors in the maximally linearly independent set that are linearly dependent on the row vector Vr are determined as an over-constrained subset of the initial constraint system.

[0025] If a row vector is linearly dependent on row vectors within the maximally linearly independent set, then the constraint is a conflict constraint and can be marked as an over-constraint. Therefore, if there exists a row vector in the first Jacobian matrix that is linearly dependent on the basis vectors in the maximally linearly independent set, then that row vector and the basis vectors in the maximally linearly independent set that are linearly dependent on it are determined as an over-constrained subset of the initial constraint system.

[0026] As can be seen from steps S1021 to S1023 of the above embodiment, by analyzing the linear independence in the constraint system, conflicting constraints are identified, thereby determining the over-constraint subset when the constraint system has a solution, reducing the complexity of the constraint conflict elimination process and improving the speed of the constraint conflict elimination process.

[0027] Step S103: If the initial constraint system has no solution, then the dimensions in the unsolvable initial constraint system are converted into variable dimensions.

[0028] The dimensions in a constraint system refer to constraints with numerical conditions (e.g., angles and distances are dimensional constraints, while coincidence and concentricity are ordinary constraints). If the initial constraint system has no solution, the dimensions in the unsolvable initial constraint system are transformed into variable dimensions. This means that when the initial constraint system has no solution, the constraints can be relaxed to make the initial constraint system more flexible to some extent, thereby introducing the possibility of a solution. Figure 5 As shown, this is a set of equations after transforming the dimensions in an unsolvable constraint system into variable dimensions. From top to bottom, the equations represent horizontal constraints, parallel constraints, angular constraints, coincident constraints, and distance constraints, respectively. The angle between lines l1 and l2 The distances from lines l1 and l2 to the origin of the coordinate system. : The vector from the origin of the coordinate system to point p. : Normal vectors of lines l1 and l2, va: Variables corresponding to the angle constraint after it is transformed into a variable size, vd: Variables corresponding to the distance constraint after it is transformed into a variable size. Figure 6 Corresponding to Figure 5 The matrix is ​​shown in the figure from top to bottom, with the row vectors representing horizontal constraints, parallel constraints, angular constraints, coincidence constraints, and distance constraints, respectively.

[0029] Step S104: If the constraint system has been transformed into a solvable variable-size constraint system, then the over-constrained subset of the initial constraint system is determined by analyzing the second Jacobian matrix, where the second Jacobian matrix is ​​the Jacobian matrix corresponding to the equation system obtained from the constraint transformation in the variable-size solvable constraint system.

[0030] If the constraint system has been transformed into a solvable variable-size constraint system, the processing method can be similar to that when the constraint system has a solution, as described above. This is because the existence of a solvable variable-size constraint system implies that the constraint system is a variable-size solvable constraint system, and essentially, it already has a solution. Specifically, as an embodiment of this application, determining the over-constrained subset of the initial constraint system by analyzing the second Jacobian matrix can be achieved through steps S1041 to S1044, as detailed below: Step S1041: Move the column vector representing the new variable added when converting the size to a variable size in the second Jacobian matrix to the end of the second Jacobian matrix to obtain the target matrix.

[0031] Step S1042: Perform row echelon simplification on the target matrix.

[0032] Row echelon reduction is a process in linear algebra that transforms a matrix into a simpler form, commonly used for solving systems of linear equations and calculating the rank of a matrix. Row echelon reduction (also known as row simplification or row echelon form) is primarily achieved through row operations. Specifically, performing row echelon reduction on a target matrix involves: starting from the first column of the target matrix, finding a non-zero element as the pivot (if all elements in the current column are zero, moving to the next column); if the pivot is not in the first row of the target matrix, swapping the current row with the row containing the pivot; if the pivot is not 1, multiplying it by a row to make it 1; using row addition to eliminate all elements below the pivot's column to zero; repeating these steps (from left to right, from top to bottom) for the remaining submatrices of the target matrix until all rows have been processed. Figure 7 As shown, it is for Figure 6 The example matrix is ​​a row echelon simplified matrix. In the figure, from top to bottom, the row vectors represent horizontal constraints, parallel constraints, angular constraints, coincidence constraints, and distance constraints, respectively.

[0033] Step S1043: Examine the first non-zero element of each row vector after row step simplification of the target matrix and the simplification relationship between each row vector during the row step simplification process.

[0034] Step S1044: Determine the row vector Vr-new, whose first non-zero element is the newly added variable, and the row vectors that participated in the simplification of row vector Vr-new during the row step simplification process as an over-constrained subset of the initial constraint system.

[0035] If the first non-zero element of a row vector in the target matrix is ​​a newly added variable, it means that the constraint corresponding to it needs to be bound to a variable with a variable size. Since this size is actually immutable, it can be concluded that the current constraint conflicts with some constraints in the constraint system. Therefore, by finding out which vectors the elements in this vector (excluding the newly added variable) reduce to zero after operations with during the row echelon simplification of the target matrix, the constraints corresponding to these vectors conflict with the constraints corresponding to the current vector, and they form an over-constrained subset.

[0036] Step S105: If there is no solution after the initial constraint system has been converted into a variable-size constraint system, then the initial constraint system is converted into a bipartite graph, wherein the bipartite graph includes constraint nodes.

[0037] If a constraint system that has been transformed into a variable-size constraint system still has no solution—that is, even if some constraints are relaxed, there is still no combination of variable values ​​that can satisfy all the constraints of the constraint system—an alternative solution can be sought. First, the initial constraint system can be transformed into a bipartite graph. In this embodiment, the bipartite graph, in addition to constraint nodes, may also include graph nodes, source nodes, and sink nodes. Graph nodes represent the degrees of freedom possessed by the graph (e.g., translation, rotation), constraint nodes represent the degrees of freedom that a constraint can constrain, and graph nodes and constraint nodes are connected by edges to represent constraint relationships. Source nodes are connected to all constraint nodes, and the capacity of the connecting edges is the number of degrees of freedom that the constraint node can constrain. Sink nodes are connected to all graph nodes, and the capacity of the connecting edges is the number of degrees of freedom of the graph nodes.

[0038] When dealing with dense graphs, directly constructing a bipartite graph and then performing maximum flow matching often leads to high time complexity (especially under many constraints). Sparsity techniques can effectively reduce the number of nodes and edges, thereby improving algorithm efficiency. Therefore, in one embodiment of this application, the above method may further include the following steps S1051 to S1053: Step S1051: Before converting the initial constraint system into a bipartite graph, analyze the structure and dependencies of the initial constraint system.

[0039] To identify relationships between constraints and determine which constraints are closely related, loosely related, and which can be removed or merged to reduce the edge count of the subsequently constructed bipartite graph, the structure and dependencies of the initial constraint system can be analyzed before transforming it into a bipartite graph. This includes constraint classification, dependency modeling, and identifying loose constraints. Constraint classification involves analyzing all constraints to identify different types (e.g., geometric, algebraic, logical constraints). Dependency modeling involves constructing a preliminary dependency graph to represent the interdependencies between constraints; for each constraint, its dependent constraints are recorded, which helps to understand which constraints are mutually influential. Identifying loose constraints involves analyzing the structure of the constraint graph to determine which constraints have weaker dependencies; loose constraints may become candidates for sparsification.

[0040] Step S1052: Based on the analysis results of the structure and dependencies of the initial constraint system, some redundant constraints and some constraints that will not cause constraint conflicts are removed from the initial constraint system, and the structure of the bipartite graph is compressed.

[0041] To reduce the number of edges in the bipartite graph and thus improve efficiency, redundant constraints and constraints that will not cause conflicts can be removed from the constraint system based on the analysis of its structure and dependencies. Redundant constraint removal is achieved through various simplification filters, each corresponding to a different redundancy scenario. The constraint system is sequentially passed through these filters, which use the dependencies between constraints to screen the system. If a redundant scenario corresponding to a simplification filter exists, the redundant constraints within that scenario will be deleted, as redundancy is reciprocal, and the deleted constraints are more loosely bounded. Constraints that will not cause conflicts are removed using pruning algorithms. These algorithms include a queue of pruning patterns, ensuring that pruned constraints do not cause conflicts. The dependency graph formed by constraints in the constraint system is processed through this queue, and portions of the dependency graph conforming to the pruning patterns are pruned sequentially.

[0042] Step S1053: After determining the over-constrained subset of the constraint system, add the set of constraints with redundant relationships that have been removed as a new over-constrained subset to the over-constrained subset of the initial constraint system.

[0043] Step S106: Perform maximum flow matching on the constraint nodes in the bipartite graph, and determine the over-constrained subset of the initial constraint system during the iterative search for the expansion path.

[0044] As an embodiment of this application, the maximum flow matching of the constraint nodes in the bipartite graph and the determination of the over-constrained subset of the initial constraint system during the iterative search for the expansion path can be achieved through steps S1061 to S1064, as detailed below: Step S1061: After the current matching is completed, examine the capacity of the connecting edges between the source node and the current constraint node in the bipartite graph, and denote the state of the bipartite graph before the current matching begins as... Let Sa denote the state of the bipartite graph after the current matching is completed as Sb, let V1 denote the current constraint node as V1, and let C1 denote the corresponding constraint as C1.

[0045] In a bipartite graph, the capacity of a connecting edge represents the maximum flow that the edge can handle. For a connecting edge between a constraint node and a graph node, this capacity only represents the maximum flow allowed by the connecting edge (i.e., the maximum "matching" capacity); if the connecting edge connects the constraint node and the source node, the capacity also represents the maximum number of degrees of freedom that the constraint node can constrain; if the connecting edge connects the graph node and the sink node, the capacity also represents the number of degrees of freedom that the graph node has.

[0046] Step S1062: Based on the relationship between the capacity of the connecting edge between the source node and the current constraint node in the bipartite graph and the flow after the connecting edge matching is completed, determine the over-constrained subset of the constraint system.

[0047] In a bipartite graph, the flow of a connecting edge represents the actual flow that has passed through that edge, which may be less than or equal to the edge's capacity. If the flow of an edge equals its capacity, it means that the edge's capacity is "full" and cannot carry any more flow. Conversely, if the flow is less than its capacity, it means that the edge still has remaining "space" to continue transmitting flow. Specifically, based on the relationship between the capacity of the connecting edge between the source node and the current constraint node in the bipartite graph and the flow after the connecting edge matching is completed, determining the over-constrained subset of the constraint system can be achieved through steps S1 to S4, as detailed below: Step S1: If the capacity of the connecting edge between the source node and the current constraint node in the bipartite graph is greater than the flow after the connecting edge is matched, then find all graph nodes in the bipartite graph that are connected to V1, and denote all graph nodes in the bipartite graph that are connected to V1 as VGroup1.

[0048] If the capacity of the connecting edge between the source node and the current constraint node in the bipartite graph is greater than the flow after the connecting edge is matched, it means that the current constraint node can continue to constrain degrees of freedom, but no constraint object can be found. Therefore, the constraint corresponding to this constraint node conflicts with other constraints. This node is called V1, and the corresponding constraint is C1. Along the connecting edge between the constraint node and the graph node (i.e., node V1 and the graph node connected to it), find all the graph nodes connected to node V1, collectively referred to as VGroup1.

[0049] Step S2: Locate all constraint nodes in the bipartite diagram that are connected to the graphical nodes in VGroup1 except for V1, and denote all constraint nodes in the bipartite diagram that are connected to the graphical nodes in VGroup1 except for V1 as VGroup2.

[0050] Continuing along the connecting edges between graphical nodes and constraint nodes (i.e., graphical nodes in VGroup1 and their connected constraint nodes), find all constraint nodes in the bipartite graph that are connected to graphical nodes in VGroup1 except for V1. Denote all constraint nodes in the bipartite graph that are connected to graphical nodes in VGroup1 except for V1 as VGroup2. It should be noted that the prerequisite for performing the above operation is that the capacity of the connecting edges between graphical nodes and constraint nodes (i.e., graphical nodes in VGroup1 and their connected constraint nodes) must be greater than 0. This is because constraints other than C1 need to actually occupy degrees of freedom in VGroup2 to be considered valid. C1 conflict.

[0051] Step S3: For the constraint nodes in VGroup2, perform the same operation as that performed on V1 at the start of the current matching, until VGroup1 or VGroup2 is empty. Then, determine all constraints corresponding to C1 and the found constraint nodes as an over-constrained subset of the constraint system, and restore the state of the bipartite graph to state Sa.

[0052] It should be noted that during steps S1 to S3 above, Vgroup1 may not connect to any nodes outside V1, or it may connect to other nodes but the capacity of the connecting edges is 0, resulting in Vgroup2 being empty. After finding Vgroup2, Vgroup2 may not connect to any nodes other than those in Vgroup1, so the next Vgroup1 may be empty. Once VGroup1 or VGroup2 is empty, all constraints corresponding to C1 and the found constraint nodes are determined as an over-constrained subset of the constraint system. It should be noted that in the above embodiment, constraint nodes and graph nodes will not be visited repeatedly during the entire search process.

[0053] Step S4: If the capacity of the connecting edge between the source node and the current constraint node in the bipartite graph is equal to the flow after the connecting edge matching is completed, increase the capacity of the connecting edge to determine the over-constrained subset of the constraint system by performing maximum flow matching again.

[0054] If the capacity of the connecting edge between the source node and the current constraint node in the bipartite graph is equal to the flow after the connecting edge matching is completed, it means that the constraint has found a suitable object. Next, the capacity of the connecting edge needs to be expanded to further check whether C1 has a direct conflict with other constraints if Vgroup1 can provide enough degrees of freedom to satisfy its constraint conditions. For example, there are two distance constraints between two points on a two-dimensional plane. Since each point has two translational degrees of freedom, and the distance constraint only needs to constrain one translational degree of freedom, from the perspective of degrees of freedom, both distance constraints can be satisfied. However, in reality, these two constraints are necessarily redundant or contradictory, that is, there must be a constraint conflict between them. The expansion amount is the sum of the number of degrees of freedom of the rigid body that are consistent with the type of degrees of freedom that the constraint can constrain if the graphs related to the constraint form a rigid body under the condition of satisfying the constraint. That is, the expansion amount of the connecting edge capacity is the number of V1 type degrees of freedom that the rigid body should have after the graphs corresponding to VGroup2 form a rigid body under the condition of only C1.

[0055] It should be noted that increasing the capacity of the connecting edges to determine the over-constrained subset of the constraint system by performing maximum flow matching again means that steps similar to S1 above will be repeated. The operation up to step S4 re-determines the over-constrained subset of the constraint system. Furthermore, "increasing the capacity of the connecting edge" here means directly increasing the capacity of a connecting edge in the bipartite graph, thereby "making room" for the already full edge to "accommodate more flow" in the next maximum flow matching process.

[0056] Step S1063: If a constrained subset has been found after the current matching is completed, restore the state of the bipartite graph to Sa; otherwise, increase the capacity of the connecting edges and perform maximum flow matching again.

[0057] Step S1064: If an over-constrained subset is found after expanding the capacity of the connecting edges and performing maximum flow matching again, then the state of the bipartite graph is restored to Sa; otherwise, the state of the bipartite graph is restored to Sb.

[0058] It should be noted that after determining the over-constrained subset, step S3 restores the state of the bipartite graph to state Sa in order to restore the flow of the connection edges between V1 and all nodes in Vgroup1 to 0. This ensures that after the current matching is completed, in the maximum flow matching process for other constrained nodes, V1 will never become a member of Vgroup2 in the matching process of other nodes (and of course, it will not before the start of this matching). That is, C1 only appears in the current over-constrained subset, and it is equivalent to being isolated from the system after the current matching is completed. This ensures that there is only one conflict in each over-constrained subset.

[0059] To illustrate the above point, consider the following example: Suppose there are four constraints C2, C3, C4, and C5 corresponding to four constraint nodes V2, V3, V4, and V5, and no bipartite graph state restoration is performed during maximum flow matching. Suppose maximum flow matching is performed on V4, and it is found that C4 conflicts with C2 and C3. V5 performs maximum flow matching and finds a conflict between C5 and C4, C3, and C2. Considering the over-constrained subset consisting of C5, C4, C3, and C2, it finds two conflicts: C5 and C4, and C4 and C3, C2 (or C5 and C2, C3, and C4 and C2, C3). In this case, it cannot be guaranteed that deleting any constraint will resolve the constraint conflict in this subset. Therefore, after finding the conflict between C4 and C2, C3, C4 must be isolated from the system to ensure that C4 is not repeatedly added to other over-constrained subsets in subsequent calculations.

[0060] After determining the constraint subset, step S1063 restores the state of the bipartite graph to state Sa, for the same reason as step S3. However, if no constraint subset is found, step S1063 restores the state of the bipartite graph to state Sb. This is because performing maximum flow matching again after expanding the connection edge between the source node and V1 is only checking for special cases. In reality, C1 cannot constrain so many degrees of freedom. The result of performing maximum flow matching on V1 before expanding the connection edge records which degrees of freedom C1 needs to occupy to be satisfied. Retaining this information on the bipartite graph is necessary to find in subsequent analysis whether constraints that have not yet started maximum flow matching conflict with C1 because they need to "compete" for degrees of freedom.

[0061] Step S107: Remove any constraint from the determined over-constrained subset. Based on the properties of over-constrained subsets, removing any constraint from the over-constrained subset determined in the above embodiment eliminates conflicting constraints.

[0062] The following is Figures 1 to 11 ( Figures 8-11 The technical solution of this application is illustrated by taking a schematic diagram of the calculation of the constrained subset using degree-of-freedom analysis as an example. Figure 8 Represents the actual constraint system. Figure 9 This is a bipartite diagram of the constraint system. Figure 10 This indicates the generation of the constraint subset 1. Figure 11 The expression represents the generation of constraint subset 2, where source represents the source node, sink represents the sink node, coi represents the coincident constraint node, dis represents the distance constraint node, par represents the parallel constraint node, hor represents the horizontal constraint node, ver represents the vertical constraint node, pLoc represents the positional degree of freedom node of point p, lLoc1 represents the positional degree of freedom node of line l1, lDir1 represents the angular degree of freedom node of line l1, lLoc2 represents the positional degree of freedom node of line l2, and lDir2 represents the angular degree of freedom node of line l2.

[0063] Figure 2 This is a solvable constraint system exemplified in this application, which can be represented as follows: Figure 3 By taking the partial derivatives with respect to the variables in the system of equations, we obtain the Jacobian matrix as follows: Figure 4 The largest linearly independent set of row vectors in the matrix is ​​marked with a red box. The linear dependence between the vectors is as follows: vectors 3 and 4 are linearly dependent, and vectors 2 and 5 are linearly dependent. Therefore, there are two over-constrained subsets in this example: parallel constraint and angular constraint, coincidence constraint and dimensional constraint. If Figure 2 If the angular and distance dimensions in the system are not zero, then the solution is unsolvable and the dimensions need to be converted into variable dimensions for solving. Add two variables representing the variable dimensions to the corresponding system of equations, such as... Figure 5 To find the Jacobian matrix for the system of equations, place the column vectors representing the variable dimensions at the end of the Jacobian matrix, as shown below. Figure 6 Perform row echelon simplification on the Jacobian matrix, such as... Figure 7 The first non-zero element of row vector 3 is a variable size, which is simplified by adding -1 times the size of row vector 2. The first non-zero element of row vector 5 is also a variable size, which is simplified by adding -1 times the size of row vector 4. Therefore, the constraints corresponding to row vectors 2 and 3 form an over-constrained subset, and the constraints corresponding to row vectors 4 and 5 form another over-constrained subset. The over-constrained sets are still divided into parallel constraints and angular constraints, coincident constraints and size constraints. In the Poisson engine, an unsolvable constraint system can be constructed as follows: Figure 8 This system remains unsolvable even after converting its dimensions to variable dimensions. Converting the system to a bipartite diagram, as shown... Figure 9Starting with the path containing the coi node, maximum flow matching continues until the path containing the dis node. After the source-dis edge is expanded, the maximum flow cannot fill the source-dis edge. Therefore, a search for the constrained subset is initiated. From the dis node, along the constraint-graph connection edge, nodes pLoc, lLoc2, and lDir2 are found. Then, from these three nodes, along the graph-constraint connection edge, the coi node is found. The search ends here, finding constrained subset 1, which includes coincident constraints and distance constraints. An example of the process is shown below. Figure 10 The bipartite graph is restored to its state before the maximum flow matching is performed on the path containing the dis node. The paths containing the par and hor nodes are successfully matched. After the path containing the ver node is matched, the maximum flow cannot fill the source-ver edge, so the search for the constrained subset is restarted. From the ver node, along the constraint-graph connection edge, the lDir1 node is found, and then from the lDir1 node, along the graph-constraint connection edge, the hor node is found. At this point, the search ends, and the constrained subset 2 is found, which contains both horizontal and vertical constraints. An example of the process is shown below. Figure 11 Before the maximum flow matching is performed on the path to the ver node in the restored bipartite graph state.

[0064] From the above appendix Figure 1 As illustrated by the constraint conflict resolution method for the example constraint system, after determining that the constraint system has a solution, the over-constrained subset of the constraint system is determined by analyzing the Jacobian matrix corresponding to the equations obtained from the constraint transformation in the solvable constraint system. If the constraint system, after being transformed into a variable-size constraint system, has no solution, the initial constraint system is transformed into a bipartite graph. Maximum flow matching is performed on the constraint nodes in the bipartite graph, and the over-constrained subset of the constraint system is determined during the iterative search for expanding paths. Since the above process can be automatically completed by a computer program, by implementing the calculation of the over-constrained subset in the constraint solving engine, the process of manually identifying which constraints contain constraints with conflicts is eliminated. This not only reduces the difficulty of resolving constraint conflicts but also greatly improves the efficiency for users. For complex constraint systems, this approach is even more efficient and effective.

[0065] Please see the appendix Figure 12 This application provides a constraint conflict resolution device for a constraint system. The device may include a judgment module 901, a first determination module 902, a first conversion module 903, a second determination module 904, a second conversion module 905, a third determination module 906, and a deletion module 907, as detailed below: Module 901 is used to determine whether the initial constraint system has a solution. The first determining module 902 is used to determine, if the initial constraint system has a solution, the solution by analyzing the first... The Jacobian matrix determines the over-constrained subset of the initial constraint system, wherein the first Jacobian matrix is ​​the Jacobian matrix corresponding to the system of equations obtained by constraint transformation in the solvable constraint system; The first conversion module 903 is used to convert the dimensions in the initial constraint system into variable dimensions if there is no solution to the initial constraint system. The second determining module 904 is used to determine the over-constrained subset of the initial constraint system by analyzing the second Jacobian matrix if the constraint system that has been transformed into a variable-size constraint system has a solution. The second Jacobian matrix is ​​the Jacobian matrix corresponding to the set of equations obtained by the constraint transformation in the variable-size constraint system with a solution. The second transformation module 905 is used to transform the initial constraint system into a bipartite graph if there is no solution after it has been transformed into a variable-size constraint system. The bipartite graph includes constraint nodes. The third determination module 906 is used to perform maximum flow matching on the constraint nodes in the bipartite graph and determine the over-constrained subset of the initial constraint system during the iterative search for the expansion path. The deletion module 907 is used to remove any constraint from the over-constraint subset.

[0066] From the above appendix Figure 12 As can be seen from the constraint conflict elimination device of the example constraint system, in determining... After a constraint system has a solution, the over-constrained subset of the constraint system is determined by analyzing the Jacobian matrix corresponding to the equations obtained from the constraint transformation in the solvable constraint system. If it is determined that the constraint system, which has been transformed into a variable-size constraint system, has no solution, the initial constraint system is transformed into a bipartite graph. Maximum flow matching is performed on the constraint nodes in the bipartite graph, and the over-constrained subset of the constraint system is determined during the iterative search for expanding paths. Since the above process can be completed automatically by a computer program, by implementing the calculation of the over-constrained subset in the constraint solving engine, the process of manually identifying which constraints contain constraints with conflicts is eliminated. This not only reduces the difficulty of eliminating constraints with conflicts but also greatly improves the efficiency of users in eliminating constraints with conflicts. For complex constraint systems, this approach is even more efficient and effective.

[0067] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 13 As shown, the electronic device 10 of this embodiment mainly includes: a processor 100, a memory 101, and a computer program 102 stored in the memory 101 and executable on the processor 100, such as a program for a constraint conflict resolution method of a constraint system. When the processor 100 executes the computer program 102, it implements the steps in the above-described constraint conflict resolution method embodiment of the constraint system, for example... Figure 1The steps S101 to S106 are shown. Alternatively, when the processor 100 executes the computer program 102, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 12 The functions of the judgment module 901, the first determination module 902, the first conversion module 903, the second determination module 904, the second conversion module 905, the third determination module 906, and the deletion module 907 are shown.

[0068] For example, the computer program 102 of the constraint conflict elimination method for the constraint system mainly includes: determining whether the initial constraint system has a solution; if the initial constraint system has a solution, determining the over-constrained subset of the initial constraint system by analyzing the first Jacobian matrix, wherein the first Jacobian matrix is ​​the Jacobian matrix corresponding to the equation set obtained by the constraint transformation in the solvable constraint system; if the initial constraint system has no solution, converting the size in the initial constraint system into a variable size; if the constraint system that has been converted into a variable size has a solution, determining the over-constrained subset of the initial constraint system by analyzing the second Jacobian matrix, wherein the second Jacobian matrix is ​​the Jacobian matrix corresponding to the equation set obtained by the constraint transformation in the solvable constraint system with variable size; if the constraint system that has been converted into a variable size has no solution, converting the initial constraint system into a bipartite graph, wherein the bipartite graph includes constraint nodes; performing maximum flow matching on the constraint nodes in the bipartite graph, and determining the over-constrained subset of the initial constraint system during the iterative search for the expansion path; and removing any constraint from the over-constrained subset. Computer program 102 can be divided into one or more modules / units. One or more modules / units are stored in memory 101 and executed by processor 100 to complete this application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 102 in electronic device 10. For example, computer program 102 can be divided into the functions of a judgment module 901, a first determination module 902, a first transformation module 903, a second determination module 904, a second transformation module 905, a third determination module 906, and a deletion module 907 (a module in a virtual device). The specific functions of each module are as follows: Judgment module 901 is used to determine whether the initial constraint system has a solution; the first determination module 902 is used to determine the over-constrained subset of the initial constraint system by analyzing the first Jacobian matrix if the initial constraint system has a solution, wherein the first Jacobian matrix is ​​the Jacobian matrix corresponding to the equation set obtained by the constraint transformation in the solvable constraint system; the first transformation module 903 is used to convert the dimensions in the initial constraint system into... The system is first transformed into a variable-size constraint system; the second determination module 904 is used to determine the over-constrained subset of the initial constraint system by analyzing the second Jacobian matrix if the variable-size constraint system has a solution, wherein the second Jacobian matrix is ​​the Jacobian matrix corresponding to the equation set obtained by the constraint transformation in the variable-size constraint system with a solution; the second transformation module 905 is used to transform the initial constraint system into a bipartite graph if the variable-size constraint system has no solution, wherein the bipartite graph includes constraint nodes; the third determination module 906 is used to perform maximum flow matching on the constraint nodes in the bipartite graph and determine the over-constrained subset of the initial constraint system during the iterative search for the expansion path; and the deletion module 907 is used to remove any constraint from the over-constrained subset.

[0069] Electronic device 10 may include, but is not limited to, processor 100 and memory 101. Those skilled in the art will understand that... Figure 13 This is merely an example of electronic device 10 and does not constitute a limitation on electronic device 10. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.

[0070] The processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0071] The memory 101 can be an internal storage unit of the electronic device 10, such as a hard disk or RAM of the electronic device 10. The memory 101 can also be an external storage device of the electronic device 10, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the electronic device 10. Furthermore, the memory 101 can include both internal and external storage units of the electronic device 10. The memory 101 is used to store computer programs and other programs and data required by the electronic device. The memory 101 can also be used to temporarily store data that has been output or will be output.

[0072] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed. That is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above-described device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0073] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0074] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0075] In the embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

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

[0077] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0078] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program for the constraint conflict elimination method of the constraint system can be stored in a storage medium. When executed by a processor, this computer program can implement the steps of the various method embodiments described above, namely, determining whether the initial constraint system has a solution; if the initial constraint system has a solution, determining the over-constrained subset of the initial constraint system by analyzing the first Jacobian matrix, where the first Jacobian matrix is ​​the Jacobian matrix corresponding to the system of equations obtained from the constraint transformation in the solvable constraint system; if the initial constraint system has no solution... The initial constraint system is then transformed into a variable-size system. If the variable-size constraint system has a solution, the over-constrained subset of the initial constraint system is determined by analyzing the second Jacobian matrix, where the second Jacobian matrix is ​​the Jacobian matrix corresponding to the equation set obtained from the constraint transformation in the variable-size constraint system with a solution. If the variable-size constraint system has no solution, the initial constraint system is transformed into a bipartite graph, which includes constraint nodes. Maximum flow matching is performed on the constraint nodes in the bipartite graph, and the over-constrained subset of the initial constraint system is determined during the iterative search for expanding paths. Any constraint is removed from the over-constrained subset. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The storage medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the contents of the storage medium may be appropriately added to or subtracted from the contents according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the storage medium may not include electrical carrier signals and telecommunication signals.

[0079] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application. The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the protection scope of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this invention.

Claims

1. A method for eliminating constraint conflicts in a constraint system, characterized in that: The method comprises: Determine whether the initial constraint system has a solution; If the initial constraint system has a solution, determining an over-constrained subset of the initial constraint system by analyzing a first Jacobian matrix, where the first Jacobian matrix is ​​a Jacobian matrix corresponding to a set of equations obtained by transforming constraints in the constraint system with a solution; If the initial constraint system has no solution, converting the dimensions in the initial constraint system into variable dimensions; If the transformed constraint system with variable size has a solution, then determining the over-constrained subset of the initial constraint system by analyzing the second Jacobian matrix, where the second Jacobian matrix is ​​the Jacobian matrix corresponding to the set of equations obtained by transforming the constraints in the variable size solvable constraint system; If the constraint system converted into a variable size has no solution, converting the initial constraint system into a bipartite graph, wherein the bipartite graph includes constraint nodes; Performing maximum flow matching on the constraint nodes in the bipartite graph, and determining an over-constrained subset of the initial constraint system in the process of iteratively searching for an expansion path; Remove any one constraint from the over-constrained subset.

2. The constraint conflict elimination method of the constraint system according to claim 1, characterized in that: The determining the over-constrained subset of the initial constraint system by analyzing the first Jacobian matrix comprises: By performing row rank analysis on the first Jacobi matrix, finding the largest linearly independent group of its row vectors; Determine row by row whether each row vector outside the maximum linearly independent group is linearly related to the basis vector in the maximum linearly independent group; If each row vector outside the maximum linearly independent group has a row vector that is linearly related to the basis vector in the maximum linearly independent group Vr , then the row vector Vr with the row vector in the largest linearly independent group Vr The linearly dependent basis vectors are determined as an over-constrained subset of the initial constraint system.

3. The constraint conflict elimination method of the constraint system according to claim 1, characterized in that: The determining the over-constrained subset of the initial constraint system by analyzing the second Jacobi matrix comprises: Move the column vector representing the newly added variables resulting from converting the size into the variable size in the second Jacobian matrix to the end of the second Jacobian matrix to obtain a target matrix; Performing row echelon simplification on the target matrix; Investigate the first non-zero element of each row vector after row echelon simplification of the target matrix and the simplification relationship between each row vector during the row echelon simplification process; The first non-zero element is the row vector of the newly added variable Vr-new and the row vectors involved in the row echelon simplification process Vr-new The simplified row vector is determined as an over-constrained subset of the initial constraint system.

4. The method for eliminating constraint conflicts of a constraint system according to claim 1, characterized in that: The bipartite graph further includes a graph node, a source node, and a sink node. The maximum flow matching is performed on the constraint nodes in the bipartite graph, and an over-constrained subset of the initial constraint system is determined in the process of iteratively searching for an expansion path, including: After the current matching is completed, the capacity of the connecting edge between the source node and the current constraint node in the bipartite graph is examined, the state of the bipartite graph before the current matching starts is recorded as Sa, the state of the bipartite graph after the current matching is completed is recorded as Sb, the current constraint node is recorded as V1, and the corresponding constraint is recorded as C1; Determine an over-constrained subset of the constraint system according to a relationship between the capacity of the connection edge between the source node and the current constraint node in the bipartite graph and the flow after the connection edge matching is completed; If an over-constrained subset has been found after the current matching is completed, the state of the bipartite graph is restored to Sa; otherwise, the capacity of the connecting edge is expanded to perform maximum flow matching again; If an over-constrained subset is found after the maximum flow matching is performed again, the state of the bipartite graph is restored to the state Sa; otherwise, the state of the bipartite graph is restored to the state Sb.

5. The constraint conflict elimination method of the constraint system as claimed in claim 4, characterized in that: The determining, according to the relationship between the capacity of the connection edge between the source node and the current constraint node in the bipartite graph and the flow after the connection edge matching is completed, the over-constrained subset of the initial constraint system comprises: If the capacity of the connection edge between the source node and the current constraint node in the bipartite graph is greater than the flow after the connection edge matching is completed, then all the graphic nodes connected to the V1 in the bipartite graph are searched, and all the graphic nodes connected to the V1 in the bipartite graph are recorded as VGroup1; Find all constraint nodes other than V1 connected to the graphic nodes in VGroup1 in the bipartite graph, and record all constraint nodes other than V1 connected to the graphic nodes in VGroup1 in the bipartite graph as VGroup2; For the constraint nodes in the VGroup2, perform the same operation as that performed for the V1 at the beginning of the current matching until the VGroup1 or VGroup2 is empty, and determine all constraints corresponding to the C1 and the found constraint nodes as an over-constrained subset of the initial constraint system; If the capacity of the connecting edge between the source node in the bipartite graph and the current constraint node is equal to the flow after the connecting edge matching is completed, the capacity of the connecting edge is expanded to determine the over-constrained subset of the initial constraint system by performing maximum flow matching again. The expanded amount is the sum of the number of degrees of freedom that the rigid body has that is consistent with the type of degrees of freedom that can be constrained by the constraint if the graph related to the constraint forms a rigid body while satisfying the constraint.

6. The method for eliminating constraint conflicts of a constraint system according to any one of claims 1 to 5, characterized in that: The method further comprises: Before determining whether the initial constraint system has a solution, decomposing the initial constraint system into a plurality of sub-constraint systems that have no constraint conflicts with each other; After determining the over-constrained subset for each of the plurality of sub-constraint systems, all the over-constrained subsets of the plurality of sub-constraint systems are merged.

7. The method for eliminating constraint conflicts of a constraint system according to any one of claims 1 to 5, characterized in that: The method further comprises: Before converting the initial constraint system into a bipartite graph, analyzing the structure and dependency relationship of the initial constraint system; According to the analysis results of the structure and dependency of the initial constraint system, some redundant constraints and some constraints that are unlikely to cause conflicts in the initial constraint system are eliminated, and the structure of the bipartite graph is compressed; After determining the over-constrained subset of the constraint system, the set of eliminated constraints with redundant relationships is added as a new over-constrained subset to the over-constrained subset of the initial constraint system.

8. A constraint conflict elimination device for a constraint system, characterized in that: The device comprises: A judgment module, used to judge whether the initial constraint system has a solution; A first determination module is used to determine an over-constrained subset of the initial constraint system by analyzing a first Jacobian matrix if the initial constraint system has a solution, wherein the first Jacobian matrix is ​​a Jacobian matrix corresponding to a set of equations obtained by transforming constraints in the constraint system with a solution; A first conversion module, configured to convert the dimensions in the initial constraint system into variable dimensions if the initial constraint system has no solution; A second determination module is used to determine the over-constrained subset of the initial constraint system by analyzing a second Jacobian matrix if the constraint system converted into a variable size has a solution, wherein the second Jacobian matrix is ​​a Jacobian matrix corresponding to the set of equations obtained by the constraint conversion in the variable size solvable constraint system; A second conversion module is used for converting the initial constraint system into a bipartite graph if the constraint system converted into a variable size has no solution, wherein the bipartite graph includes constraint nodes; A third determination module is used to perform maximum flow matching on the constraint nodes in the bipartite graph and determine the over-constrained subset of the initial constraint system in the process of iteratively searching for an expansion path; The deletion module is used to remove any constraint from the over-constrained subset.

9. 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 computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.