Search

CN-122019945-A - Adaptive solving method of linear equation set based on multi-task perception AI model pool

CN122019945ACN 122019945 ACN122019945 ACN 122019945ACN-122019945-A

Abstract

The application relates to a linear equation set self-adaptive solving method and system based on a multitask sensing AI model pool, which are used for acquiring matrix data and right-end item data of an input linear equation set to be solved, carrying out multi-modal feature extraction on the matrix data and the right-end item data to obtain multi-modal features of the linear equation set, calling a corresponding model according to the current solving environment context, carrying out automatic analysis on the multi-modal features of the linear equation set to obtain a re-ordered linear equation set and a re-ordered sequence, selecting a proper iteration method and pre-condition sub-combination, iteration method parameters, pre-condition sub-parameters and sparse matrix operators, carrying out solving option setting on a solver, carrying out corresponding matrix format conversion and kernel binding, calling the solver after the solving option setting to solve the re-ordered linear equation set to obtain a solution vector, and carrying out inverse re-ordering on the solution vector based on the re-ordered sequence to obtain a final solution vector. The calculation time is obviously reduced, the solving efficiency is improved, and the utilization rate of hardware resources is fully improved.

Inventors

  • Yang Wangdong
  • Huang Shunsen
  • LI KENLI
  • LIU RUIHUA
  • MEN ZHIGUO
  • LIN SHENGLE
  • WANG HAOTIAN

Assignees

  • 湖南大学

Dates

Publication Date
20260512
Application Date
20260210

Claims (10)

  1. 1. The linear equation set self-adaptive solving method based on the multi-task perception AI model pool is characterized by comprising the following steps: acquiring input matrix data and right term data of a linear equation set to be solved; Multi-modal feature extraction is carried out on the matrix data and the right-end term data, and multi-modal features of the linear equation set are obtained; According to the context of the current solving environment, a corresponding resequencing method optimization model is called, the multi-modal characteristics of the linear equation set are automatically analyzed and selected to obtain a proper resequencing method, and the linear equation set is resequenced according to the selected resequencing method to obtain a resequencing linear equation set and a resequencing sequence; According to the context of the current solving environment and the type of the linear equation set, calling a corresponding iterative method and a precondition sub-combination optimization model, automatically analyzing the multi-modal characteristics of the linear equation set, and selecting a proper iterative method and a precondition sub-combination; according to the context of the current solving environment and the selected iterative method, a corresponding iterative method parameter optimization model is called, and the multi-modal characteristics of the linear equation set are automatically analyzed to select proper iterative method parameters; calling a corresponding precondition subparameter optimization model according to the context of the current solving environment and the selected precondition subparameter combination, and automatically analyzing the multi-modal characteristics of the linear equation set to select a proper precondition subparameter; According to the context of the current solving environment, a corresponding sparse matrix operator optimization model is called, and the multi-modal characteristics of the linear equation set are automatically analyzed to select a sparse matrix operator; And according to the selected iteration method, the pre-condition sub-combination, the iteration method parameters and the pre-condition sub-parameters, setting a solving option for a solver, carrying out corresponding matrix format conversion and kernel binding according to the selected sparse matrix operator, calling the solver after setting the solving option to solve the re-ordered linear equation set to obtain a solution vector, and carrying out inverse re-ordering on the solution vector based on the re-ordered sequence to obtain a final solution vector.
  2. 2. The method of claim 1, wherein obtaining the input matrix data and right-hand term data for the set of linear equations to be solved comprises: if the matrix data and the right-end item data are read from the MTX file, analyzing the head type information of the MTX file, identifying a data storage mode, a real complex number and a matrix type, and then reading the row number and the column number of the matrix, the number of non-zero elements and specific data; If the data read from the MTX file, the data in COO format or the data in CSR format only exist in the main process, the data is uniformly divided according to the number of lines, and the corresponding data is distributed to each process by the main process.
  3. 3. The method of claim 1, wherein the linear equation set multi-modal features include numerical features and modal features, the modal features being a multi-channel graph of 128 x 128 compressed matrices, each pixel point corresponding to each block of a 128 x 128 segmented matrix of the atom matrix, the channel including a number of non-zero elements, a proportion of non-zero elements, a number of diagonal non-zero elements, a maximum of non-zero elements, and a maximum of diagonal non-zero elements.
  4. 4. The method of claim 1, wherein the automatically analyzing the multi-modal features of the system of linear equations to select an appropriate re-ordering method according to the context of the current solution environment and re-ordering the system of linear equations according to the selected re-ordering method to obtain a re-ordered system of linear equations and a re-ordered sequence, comprising: constructing a resequencing method optimization model aiming at different computer architectures and different computing environments, wherein the resequencing method optimization model learns the mapping relation between the multi-mode characteristics of the linear equation set and the optimal resequencing method through training; According to the context of the current solving environment, a corresponding resequencing method optimization model is called, the multi-mode characteristics of the linear equation set are input into the called resequencing method optimization model, and a resequencing method which is most suitable for the current linear equation set is selected; And calculating a row re-order sequence and a column re-order sequence according to the matrix data and the selected re-order method, re-ordering the matrix by using the row re-order sequence and the column re-order sequence, and re-ordering the right-end item by using the row re-order sequence to obtain a re-order linear equation set.
  5. 5. The method of claim 1, wherein automatically analyzing the multi-modal feature of the system of linear equations to select a suitable iterative method and precondition sub-combination based on the current solution environment context and the corresponding iterative method and precondition sub-combination preference model of the system of linear equations type call, comprising: constructing an iteration method and a precondition sub-combination optimization model aiming at different computer architectures, different computing environments and linear equation set types, wherein the iteration method and the precondition sub-combination optimization model learn the mapping relation between the linear equation set multi-modal characteristics and the optimal iteration method and the precondition sub-combination through training; And according to the context of the current solving environment and the type calling corresponding resequencing method optimal model of the linear equation set, inputting the multi-modal characteristics of the linear equation set into the called resequencing method optimal model, and selecting the optimal iterative method and the precondition sub-combination which are most suitable for the current linear equation set.
  6. 6. The method of claim 1, wherein automatically analyzing the multi-modal characteristics of the system of linear equations to select suitable iterative method parameters based on the current solution environment context and the selected iterative method call a corresponding iterative method parameter preference model, comprising: Constructing iteration method parameter optimization models aiming at different computer architectures, different computing environments and different iteration methods, wherein the iteration method parameter optimization models learn the mapping relation between the multi-mode characteristics of the linear equation set and the iteration method optimal parameters through training; And calling a corresponding iteration method parameter optimization model according to the context of the current solving environment and the selected iteration method, inputting the multi-mode characteristics of the linear equation set into the called iteration method parameter optimization model, and selecting the optimal iteration method parameter which is most suitable for the current linear equation set.
  7. 7. The method of claim 1, wherein automatically analyzing the multi-modal feature of the system of linear equations to select the appropriate preconditioned subparameter based on the current solution environment context and the selected preconditioned subparameter optimization model, comprising: Constructing a preconditioned subparameter optimization model aiming at different computer architectures, different computing environments and different preconditions, wherein the preconditioned subparameter optimization model learns the mapping relation between the multi-modal characteristics of the linear equation set and the optimal preconditioned subparameter through training; And calling a corresponding precondition subparameter optimization model according to the context of the current solving environment and the selected precondition subparameter combination, inputting the multi-modal characteristics of the linear equation set into the called precondition subparameter optimization model, and selecting the optimal precondition subparameter which is most suitable for the current linear equation set.
  8. 8. The method of claim 1, wherein automatically analyzing the multi-modal features of the system of linear equations to select sparse matrix operators based on the current solution environment context calls a corresponding sparse matrix operator preference model, comprising: constructing a sparse matrix operator optimal selection model aiming at different computer architectures and different computing environments, wherein the sparse matrix operator optimal selection model learns the mapping relation between the multi-modal characteristics of the linear equation set and the optimal sparse matrix operator through training; And calling a corresponding sparse matrix operator optimal selection model according to the context of the current solving environment, and inputting the multi-modal characteristics of the linear equation set into the called sparse matrix operator optimal selection model to select the optimal sparse matrix operator most suitable for the current linear equation set.
  9. 9. The method of claim 1, wherein the step of setting a solution option for the solver according to the selected iteration method and precondition sub-combination, iteration method parameters and precondition sub-parameters, performing corresponding matrix format conversion and kernel binding according to the selected sparse matrix operator, calling the solver after setting the solution option to solve the re-ordered linear equation set to obtain a solution vector, and performing inverse re-ordering on the solution vector based on the re-ordered sequence to obtain a final solution vector, comprises: Creating a solution option configuration according to the selected iteration method and precondition, iteration method parameters, precondition parameters, maximum iteration times, iteration convergence relative residual error precision, iteration convergence absolute residual error precision, iteration divergence relative residual error precision and residual error calculation mode, and setting a solver according to the created solution option configuration; Performing corresponding format conversion on the matrix according to the selected sparse matrix operator, and setting a sparse matrix operator kernel called by the solver; calling a set solver to solve the resequencing linear equation set to obtain a solution vector; and carrying out inverse resequencing on the solution vector obtained by solving according to the resequencing sequence to obtain a final solution vector.
  10. 10. A system for adaptive solution of a linear system of equations based on a pool of multitasking perceptual AI models, comprising: the first module is used for acquiring input matrix data and right-end term data of the linear equation set to be solved; the second module is used for carrying out multi-mode feature extraction on the matrix data and the right-end item data to obtain multi-mode features of the linear equation set; The third module is used for calling a corresponding resequencing method optimization model according to the context of the current solving environment, automatically analyzing the multi-modal characteristics of the linear equation set to select a proper resequencing method, and resequencing the linear equation set according to the selected resequencing method to obtain a resequencing linear equation set and a resequencing sequence; The fourth module is used for calling a corresponding iteration method and a precondition sub-combination optimization model according to the context of the current solving environment and the type of the linear equation set, and automatically analyzing the multi-mode characteristics of the linear equation set to select a proper iteration method and a precondition sub-combination; a fifth module, configured to invoke a corresponding iteration method parameter optimization model according to the context of the current solution environment and the selected iteration method, and automatically analyze the multi-mode characteristics of the linear equation set to select a suitable iteration method parameter; The sixth module is used for calling a corresponding precondition subparameter optimization model according to the context of the current solving environment and the selected precondition subparameter combination, and automatically analyzing the multi-modal characteristics of the linear equation set to select a proper precondition subparameter; A seventh module, configured to invoke a corresponding sparse matrix operator optimization model according to a context of a current solution environment, and automatically analyze the multi-modal characteristics of the linear equation set to select a sparse matrix operator; and an eighth module, configured to set a solution option for the solver according to the selected iteration method and the precondition sub-combination, the iteration method parameter and the precondition sub-parameter, perform corresponding matrix format conversion and kernel binding according to the selected sparse matrix operator, call the solver after the solution option setting to solve the reordered linear equation set to obtain a solution vector, and perform inverse reorder on the solution vector based on the reordered sequence to obtain a final solution vector.

Description

Adaptive solving method of linear equation set based on multi-task perception AI model pool Technical Field The application relates to the technical field of scientific calculation and high-performance calculation, in particular to a linear equation set self-adaptive solving method and system based on a multitasking perception AI model pool. Background The solution of a linear system of equations is a core computational bottleneck in many fields of scientific computation, engineering simulation, financial modeling, artificial intelligence, etc., and its form is generally expressed as ax=b, a is a coefficient matrix, b is a known vector, and x is an unknown vector to be solved. For a large-scale sparse linear equation set, an iterative method becomes a preferred scheme due to lower memory and computational complexity. The iterative solution of a linear system of equations is not a single algorithm, but a complex process comprising a plurality of critical stages, the overall efficiency and stability of which is highly dependent on the technological choices made for each stage. However, the existing iterative solving method of the linear equation set mostly depends on stiff fixed rules or trial and error with high calculation cost, and how to realize optimization of the overall solving performance of the linear equation set and improve the solving efficiency is a problem to be solved urgently. Disclosure of Invention Based on the above, it is necessary to provide a linear equation set adaptive solving method and system based on a multi-task perception AI model pool, which can realize optimization of the overall solving performance of the linear equation set and improve the solving efficiency. The first aspect of the application provides a linear equation set self-adaptive solving method based on a multitasking perception AI model pool, which comprises the following steps: acquiring input matrix data and right term data of a linear equation set to be solved; Multi-modal feature extraction is carried out on the matrix data and the right-end term data, and multi-modal features of the linear equation set are obtained; According to the context of the current solving environment, a corresponding resequencing method optimization model is called, the multi-modal characteristics of the linear equation set are automatically analyzed and selected to obtain a proper resequencing method, and the linear equation set is resequenced according to the selected resequencing method to obtain a resequencing linear equation set and a resequencing sequence; According to the context of the current solving environment and the type of the linear equation set, calling a corresponding iterative method and a precondition sub-combination optimization model, automatically analyzing the multi-modal characteristics of the linear equation set, and selecting a proper iterative method and a precondition sub-combination; according to the context of the current solving environment and the selected iterative method, a corresponding iterative method parameter optimization model is called, and the multi-modal characteristics of the linear equation set are automatically analyzed to select proper iterative method parameters; calling a corresponding precondition subparameter optimization model according to the context of the current solving environment and the selected precondition subparameter combination, and automatically analyzing the multi-modal characteristics of the linear equation set to select a proper precondition subparameter; According to the context of the current solving environment, a corresponding sparse matrix operator optimization model is called, and the multi-modal characteristics of the linear equation set are automatically analyzed to select a sparse matrix operator; And according to the selected iteration method, the pre-condition sub-combination, the iteration method parameters and the pre-condition sub-parameters, setting a solving option for a solver, carrying out corresponding matrix format conversion and kernel binding according to the selected sparse matrix operator, calling the solver after setting the solving option to solve the re-ordered linear equation set to obtain a solution vector, and carrying out inverse re-ordering on the solution vector based on the re-ordered sequence to obtain a final solution vector. In one embodiment, obtaining input matrix data and right term data of a system of linear equations to be solved includes: if the matrix data and the right-end item data are read from the MTX file, analyzing the head type information of the MTX file, identifying a data storage mode, a real complex number and a matrix type, and then reading the row number and the column number of the matrix, the number of non-zero elements and specific data; If the data read from the MTX file, the data in COO format or the data in CSR format only exist in the main process, the data is uniformly divided according to the number of lin