Adaptive solving method for linear equation set based on multi-task perception AI model pool

By using an adaptive solution method based on a multi-task-aware AI model pool, the optimal solution strategy is dynamically matched, which solves the problem of low efficiency in iterative solution of linear equation systems in existing technologies, and achieves efficient solution and resource utilization.

CN122019945APending Publication Date: 2026-05-12HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN UNIV
Filing Date
2026-02-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing iterative methods for solving linear equations rely on rigid, fixed rules or costly trial and error, lacking adaptive optimization, resulting in low solution efficiency and insufficient resource utilization.

Method used

An adaptive solution method based on a multi-task perception AI model pool is adopted. Through multi-modal feature extraction and intelligent scheduling mechanism, the optimal solution strategy is dynamically matched, and preprocessing, algorithm selection and parameter tuning tasks are integrated to achieve intelligent collaborative optimization of the whole process.

Benefits of technology

It significantly improves the solution efficiency of large-scale sparse linear equation systems, reduces the number of iterations, lowers computation time, and enhances hardware resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019945A_ABST
    Figure CN122019945A_ABST
Patent Text Reader

Abstract

The invention relates to a linear equation set adaptive solving method and system based on a multi-task perception AI model pool. The method comprises the following steps: acquiring input matrix data and right-end item data of a linear equation set to be solved; performing multi-modal feature extraction on the matrix data and the right-end item data to obtain multi-modal features of a linear equation set; calling a corresponding model according to the context of the current solving environment, automatically analyzing the multi-modal characteristics of the system of linear equations to obtain a multi-order system of linear equations and a multi-order sequence, selecting a proper combination of an iteration method and a precondition sub-, iteration method parameters, precondition sub-parameters and sparse matrix operators, and calculating the multi-order system of linear equations and the multi-order sequence of linear equations. And performing solution option setting on the solver, performing corresponding matrix format conversion and kernel binding, calling the solver after the solution option setting to solve the reorder linear equation set to obtain a solution vector, and performing inverse reorder on the solution vector based on a reorder sequence to obtain a final solution vector. The calculation time is obviously shortened, the solving efficiency is improved, and the hardware resource utilization rate is fully improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of scientific computing and high-performance computing, and in particular to an adaptive solution method and system for linear equations based on a multi-task-aware AI model pool. Background Technology

[0002] Solving systems of linear equations is a core computational bottleneck in many fields, including scientific computing, engineering simulation, financial modeling, and artificial intelligence. These systems are typically represented as Ax = b, where A is the coefficient matrix, b is a known vector, and x is the unknown vector to be solved. For large-scale sparse linear equation systems, iterative methods are the preferred approach due to their lower memory and computational complexity. However, iteratively solving linear equation systems is not a single algorithm but a complex process involving multiple key stages. The overall efficiency and stability of this process highly depend on the technical choices made at each stage.

[0003] However, most existing iterative solutions for linear equation systems rely on rigid, fixed rules or computationally expensive trial-and-error methods. How to optimize the global solution performance of linear equation systems and improve solution efficiency is an urgent problem to be solved. Summary of the Invention

[0004] Therefore, it is necessary to provide an adaptive solution method and system for linear equation systems based on a multi-task-aware AI model pool, which can optimize the global solution performance of linear equation systems and improve the solution efficiency, in order to address the above problems.

[0005] The first aspect of this application provides an adaptive solution method for linear equation systems based on a multi-task-aware AI model pool, including: Obtain the matrix data and right-hand side terms of the input linear equation system to be solved; Multimodal features are extracted from matrix data and right-hand side data to obtain multimodal features of the linear equation system; Based on the current solution environment context, the corresponding reordering method is invoked to select the optimal model. The multimodal characteristics of the linear equation system are automatically analyzed to select a suitable reordering method. The linear equation system is then reordered according to the selected reordering method to obtain the reordered linear equation system and the reordered sequence. Based on the current solution environment context and the type of linear equation system, the corresponding iterative method and precondition sub-combination optimization model are invoked to automatically analyze the multimodal characteristics of the linear equation system and select a suitable iterative method and precondition sub-combination. Based on the current solution environment context and the selected iteration method, the corresponding iteration method parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select appropriate iteration method parameters. Based on the current solution environment context and the selected preconditioner combination, the corresponding preconditioner parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select suitable preconditioner parameters. Based on the current solution environment context, the corresponding sparse matrix operator optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select sparse matrix operators. Based on the selected combination of iterative methods and preconditioners, the parameters of the iterative methods and the parameters of the preconditioners, the solver is configured with solution options. Based on the selected sparse matrix operators, the corresponding matrix format is converted and the kernel is bound. The solver with the solution options configured is called to solve the reordered linear equation system to obtain the solution vector. Then, the solution vector is reversed based on the reordered sequence to obtain the final solution vector.

[0006] In one embodiment, obtaining the matrix data and right-hand side data of the input linear equation system to be solved includes: If matrix data and right-hand side data are read from an MTX file, the MTX file header type information is parsed to identify the data storage method, real and complex numbers, and matrix type. Then, the number of rows and columns of the matrix and the number of non-zero elements and the specific data are read. If the data read from the MTX file, the COO format data, or the CSR format data only exists in the main process, the data is evenly divided according to the number of rows, and the main process distributes the corresponding data to each process.

[0007] In one embodiment, the multimodal features of the linear equation system include numerical features and modal features. The modal features are obtained by compressing the matrix into a 128*128 multi-channel image. Each pixel corresponds to each block of the 128*128 block matrix of the original matrix. The channels include the number of non-zero elements, the proportion of non-zero elements, the number of non-zero elements on the diagonal, the maximum value of non-zero elements, and the maximum value of non-zero elements on the diagonal.

[0008] In one embodiment, the corresponding reordering method optimization model is invoked based on the current solution environment context. A suitable reordering method is automatically selected by analyzing the multimodal characteristics of the linear equation system. The linear equation system is then reordered according to the selected reordering method to obtain a reordered linear equation system and a reordered sequence, including: For different computer architectures and computing environments, a reordering method optimization model is constructed. The reordering method optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal reordering method through training. Based on the current solution environment context, the corresponding reorder method optimization model is invoked, and the multimodal features of the linear equation system are input into the invoked reorder method optimization model to select the most suitable reorder method for the current linear equation system. Based on the matrix data and the selected reordering method, the row reordering sequence and column reordering sequence are calculated. The matrix is ​​then reordered using the row reordering sequence and column reordering sequence. The right-hand side terms are then reordered using the row reordering sequence, resulting in a reordered linear equation system.

[0009] In one embodiment, based on the current solution environment context and the type of the linear equation system, the corresponding iterative method and preconditioner combination optimization model are invoked to automatically analyze the multimodal characteristics of the linear equation system and select a suitable iterative method and preconditioner combination, including: For different computer architectures, different computing environments and types of linear equation systems, an optimal model for iterative methods and precondition sub-combinations is constructed. The optimal model for iterative methods and precondition sub-combinations learns the mapping relationship between the multimodal features of linear equation systems and the optimal iterative methods and precondition sub-combinations through training. Based on the current solution environment context and the type of linear equation system, the corresponding reorder method optimization model is invoked. The multimodal characteristics of the linear equation system are input into the invoked reorder method optimization model, and the optimal iterative method and preconditioner combination that best suits the current linear equation system is selected.

[0010] In one embodiment, based on the current solution environment context and the selected iteration method, the corresponding iteration method parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select suitable iteration method parameters, including: For different computer architectures, different computing environments and different iterative methods, an optimal model for the parameters of the iterative method is constructed. The optimal model for the parameters of the iterative method learns the mapping relationship between the multimodal features of the linear equation system and the optimal parameters of the iterative method through training. Based on the current solution environment context and the selected iterative method, the corresponding iterative method parameter optimization model is invoked. The multimodal characteristics of the linear equation system are input into the invoked iterative method parameter optimization model, and the optimal iterative method parameters that best suit the current linear equation system are selected.

[0011] In one embodiment, based on the current solution environment context and the selected preconditioner combination, the corresponding preconditioner parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select suitable preconditioner parameters, including: For different computer architectures, different computing environments and different preconditioners, a preconditioner parameter optimization model is constructed. The preconditioner parameter optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal preconditioner parameters through training. Based on the current solution environment context and the selected preconditioner combination, the corresponding preconditioner parameter optimization model is invoked. The multimodal characteristics of the linear equation system are input into the invoked preconditioner parameter optimization model, and the optimal preconditioner parameter that best suits the current linear equation system is selected.

[0012] In one embodiment, based on the current solution environment context, a corresponding sparse matrix operator optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select sparse matrix operators, including: For different computer architectures and computing environments, a sparse matrix operator optimization model is constructed. The sparse matrix operator optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal sparse matrix operator through training. Based on the current solution environment context, the corresponding sparse matrix operator optimization model is invoked. The multimodal features of the linear equation system are input into the invoked sparse matrix operator optimization model, and the optimal sparse matrix operator that best suits the current linear equation system is selected.

[0013] In one embodiment, the solver is configured with solution options based on the selected combination of iterative methods and preconditioners, iterative method parameters, and preconditioner parameters. The matrix format is then transformed and the kernel is bound according to the selected sparse matrix operator. The solver with the configured solution options is then called to solve the reordered linear equation system to obtain a solution vector. Finally, the solution vector is reversed based on the reordered sequence to obtain the final solution vector, including: Create a solver option configuration based on the selected iterative method and preconditioner, iterative method parameters, preconditioner parameters, maximum number of iterations, relative residual accuracy of iterative convergence, absolute residual accuracy of iterative convergence, relative residual accuracy of iterative divergence, and residual calculation method, and set the solver according to the created solver option configuration; The matrix is ​​transformed into the corresponding format according to the selected sparse matrix operator, and the kernel of the sparse matrix operator called by the solver is set. The pre-configured solver is invoked to solve the reordered linear equation system, and the solution vector is obtained. The solution vectors obtained by reordering are reversed according to the reordered sequence to obtain the final solution vector.

[0014] A second aspect of this application provides an adaptive solution system for linear equations based on a multi-task-aware AI model pool, comprising: The first module is used to obtain the matrix data and right-hand side data of the input linear equation system to be solved; The second module is used to extract multimodal features from matrix data and right-hand side data to obtain multimodal features of the linear equation system. The third module is used to call the corresponding reordering method to select the optimal model according to the current solution environment context, automatically analyze the multimodal characteristics of the linear equation system to select a suitable reordering method, and reorder the linear equation system according to the selected reordering method to obtain the reordered linear equation system and the reordered sequence. The fourth module is used to call the corresponding iterative method and precondition sub-combination optimization model according to the current solution environment context and the type of linear equation system, and to automatically analyze the multimodal characteristics of the linear equation system to select a suitable iterative method and precondition sub-combination. The fifth module is used to call the corresponding iterative method parameter optimization model according to the current solution environment context and the selected iterative method, and automatically analyze the multimodal characteristics of the linear equation system to select suitable iterative method parameters. The sixth module is used to call the corresponding precondition subparameter optimization model based on the current solution environment context and the selected precondition subcombination, and to automatically analyze the multimodal characteristics of the linear equation system to select suitable precondition subparameters. The seventh module is used to call the corresponding sparse matrix operator optimization model according to the current solution environment context, and automatically analyze the multimodal characteristics of the linear equation system to select sparse matrix operators. The eighth module is used to set the solver's solution options based on the selected combination of iterative methods and preconditioners, the parameters of the iterative methods, and the parameters of the preconditioners. It performs corresponding matrix format conversion and kernel binding based on the selected sparse matrix operators, calls the solver with the solution options set to solve the reordered linear equation system to obtain the solution vector, and then reverses the reordered sequence of the solution vector to obtain the final solution vector.

[0015] The aforementioned adaptive solution method and system for linear equations based on a multi-task-aware AI model pool integrates disparate decision-making tasks such as preprocessing, algorithm selection, and parameter tuning into a unified framework. Through a multi-task-aware AI model pool and intelligent scheduling mechanism, it achieves intelligent collaborative optimization of the entire process from feature analysis to strategy generation and execution. It dynamically matches the optimal solution strategy for equations with different characteristics, effectively reduces the number of iterations, significantly reduces computation time, improves solution efficiency, and fully enhances hardware resource utilization, achieving an overall leap in the performance of solving large-scale sparse linear equations. Attached Figure Description

[0016] Figure 1 This is a flowchart of an adaptive solution method for linear equations based on a multi-task-aware AI model pool in one embodiment; Figure 2 This is a block diagram of an adaptive solution system for linear equations based on a multi-task-aware AI model pool in one embodiment. Figure 3This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0019] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising / including” or “having,” etc., specify the presence of the stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.

[0020] The current mainstream iterative solution process for linear equation systems mainly includes the following stages: 1. Preprocessing Optimization: Before the formal iteration begins, the original coefficient matrix A is scaled and sorted to improve its numerical stability or enhance locality in the computation process. The choice at this stage (such as which sorting algorithm to use) has a profound impact on all subsequent stages.

[0021] 2. Iterative Method and Preconditioner Selection: This is the core decision-making step in the entire solution process. First, a basic iterative method (such as the conjugate gradient method, GMRES, or biconjugate gradient method) needs to be selected based on the mathematical properties of the coefficient matrix A (e.g., symmetry, positive definiteness, sparse mode). Then, to greatly accelerate the convergence of this iterative method, an efficient preconditioner M needs to be configured to construct an equivalent system: M⁻¹Ax = M⁻¹b. The selection of the preconditioner (such as incomplete LU decomposition, multigrid, Jacobi, etc.) must match the selected iterative method, and its optimal combination strongly depends on the specific properties of the coefficient matrix A.

[0022] 3. Iterative Method Parameter Selection: In addition to the user-defined convergence criteria, many iterative algorithms contain internal parameters that have a critical impact on convergence performance. A typical example is the restart step size of restart methods such as GMRES, whose optimal value requires a trade-off between memory usage and convergence speed, and is strongly dependent on the characteristics of the coefficient matrix.

[0023] 4. Preconditioner Parameter Selection: After selecting a preconditioner type, there are a large number of adjustable parameters within it. For example, in incomplete LU decomposition, small changes in parameters such as fill level and descent tolerance can greatly affect its performance as a preconditioner and its computational cost.

[0024] 5. Sparse Matrix Operator Selection: For fundamental linear algebra operations such as matrix-vector multiplication and vector inner product, there are various algorithmic implementations and data structures to choose from. Taking the core operation of sparse matrix-vector multiplication (SpMV) as an example, its computational efficiency depends heavily on the sparse matrix storage format used (such as CSR, CSC, ELL, DIA, etc.). Different storage formats differ significantly in storage overhead, memory access patterns, and adaptability to specific sparse structures.

[0025] However, current iterative solution processes have significant shortcomings when facing complex decision-making processes involving multiple stages and tasks: First, they lack fine-grained task decomposition of the solution process and the provision of corresponding dedicated optimization models; second, they lack an intelligent scheduling system capable of accurately invoking these dedicated models to complete specific tasks based on the dynamic context of the solution process. Current iterative solution processes mostly rely on rigid, fixed rules or computationally expensive trial-and-error methods, while a single AI model struggles to achieve optimal performance across all tasks.

[0026] Therefore, there is an urgent need to build an adaptive solution system based on multi-model collaboration. This system should not only provide dedicated optimization models for each task in the solution process, but more importantly, introduce an intelligent scheduler with perception and decision-making capabilities to achieve precise scheduling and orderly execution of models according to the real-time task context. This will fundamentally make up for the shortcomings of existing single models or fixed strategies and achieve optimization of global solution performance.

[0027] The current process of solving large-scale sparse matrices relies heavily on human experience for decision-making at each stage, lacking adaptive optimization capabilities, resulting in low efficiency and insufficient utilization of computational resources. This application provides an adaptive solution method and system for linear equation systems based on a multi-task-aware AI model pool. AI-assisted solution suffers from fragmented multi-stage decision-making tasks and a lack of adaptive collaboration. By constructing an AI model pool capable of perceiving different decision-making tasks and introducing an intelligent scheduler with perception and decision-making capabilities, the scheduler adaptively selects and calls the most suitable AI solution model for various linear equation systems based on the context of the solution task and the analysis of the numerical and pattern characteristics of the input matrix and right-hand side terms. This achieves intelligent collaborative optimization throughout the entire iterative solution process of linear equation systems. This significantly improves the solution efficiency of large-scale sparse linear equation systems, effectively reduces the number of steps required for iterative convergence, and makes fuller use of computational resources, thereby improving the overall performance and efficiency of scientific computing and engineering simulation.

[0028] In one embodiment, such as Figure 1 As shown, an adaptive solution method for linear equation systems based on a multi-task-aware AI model pool is provided, including: Step S1: Obtain the matrix data and right-hand side data of the input linear equation system to be solved. The data of the linear equation system to be solved includes matrix data stored in MatrixMarket (MTX) format, coordinate (COO) format, and compressed sparse row (CSR) format, as well as right-hand side data stored in MatrixMarket (MTX) format and dense format. In one embodiment, step S1 includes steps 11 and 12.

[0029] Step 11: If reading matrix data and right-hand side data from an MTX file, parse the MTX file header type information to identify the data storage method, real and complex numbers, and matrix type, and then read the number of rows and columns of the matrix and the number of non-zero elements and the specific data.

[0030] When reading matrix data and right-hand side data from an MTX file, the process parses the MTX file header type information, first calling `mm_read_banner` to identify the data storage method, real / complex numbers, and matrix type. If the matrix is ​​in coordinate format, `mm_read_mtx_crd_size` is called to read the number of rows and columns and the number of non-zero elements, then the rows, columns, and values ​​of the non-zero elements are read sequentially. If the matrix is ​​in array format, `mm_read_mtx_array_size` reads the number of rows and columns, then the non-zero elements are read sequentially. For data stored in a single MTX file, it can be read by the main process, or the data can be evenly divided according to the number of rows and read by each process. For data stored in multiple MTX files, each MTX file generally does not have cross-row issues and has been allocated the same number of processes; each process reads only the corresponding MTX file.

[0031] Step 12: If the data read from the MTX file, the data in COO format, or the data in CSR format exists only in the main process, the data is evenly divided according to the number of rows, and the main process distributes the corresponding data to each process.

[0032] Specifically, if the data read from the MTX file, the data in COO format, or the data in CSR format only exists in the main process, the main process calculates the data range that each process is responsible for based on the number of rows and the number of processes to obtain the matrix partitioning result. Then, based on the partitioning result, the corresponding data is sent to each process via MPI_Send, and other processes receive the corresponding data via MPI_Recv.

[0033] Step S2: Extract multimodal features from the matrix data and right-hand side data to obtain multimodal features of the linear equation system. These multimodal features include numerical features and modal features. Numerical features include, but are not limited to, simple features, structural features, measurement features, normal variance features, and other features of the matrix, as well as simple features, structural features, and other features of the right-hand side. Modal features are obtained by compressing the matrix into a 128*128 multi-channel image, where each pixel corresponds to a block in the original 128*128 block matrix. Channels include, but are not limited to, the number of non-zero elements, the proportion of non-zero elements, the number of non-zero elements on the diagonal, the maximum value of non-zero elements, and the maximum value of non-zero elements on the diagonal.

[0034] Based on the storage format of the matrix data and right-hand side data obtained in step S1, the corresponding feature extraction program is called to perform multimodal feature extraction, resulting in multimodal features of the linear equation system. If the storage format is COO, CreateMatrixFeaturesFromLocalCOO and CreateVectorFeaturesFromLocalDense are called to extract features from the linear equation system; if the storage format is CSR, CreateMatrixFeaturesFromLocalCSR and CreateVectorFeaturesFromLocalDense are called to extract features from the linear equation system, thus obtaining matrix features MatrixFeatures and right-hand side features VectorFeatures.

[0035] Furthermore, numerical feature extraction includes: simple features (such as trace, traceAbs, norm1, normInf, normF, diagonalDominantRatio, symmetrySnorm, symmetryAnorm, symmetryFnorm, symmetryFanorm, etc.), structural features (such as rowNum, colNum, nnz, maxNnzEachRow, minNnzEachRow, nDummyRows, diagZerostat, diagDefinite, isSymmetric, etc.), measurement features (such as rowVariability, colVariability, diagonalAverage, diagonalVariance, diagonalSign, etc.), spectral features (such as kappa, positiveFraction, etc.), normal variance features (such as traceAsquared, etc.), and other features (such as nnz, nnzLower, nnzUpper, averageNnzEachRow, arrNnzEachRow, relSymm, upBand, loBand, etc.). (e.g., nnzDiagonal,,avgDiagDist,sigmaDiagDis, etc.). Pattern feature extraction includes the number of non-zero elements in each sub-block of the matrix, the proportion of non-zero elements, the number of non-zero elements on the diagonal, the maximum value of non-zero elements, and the maximum value of non-zero elements on the diagonal.

[0036] Step S3: Based on the current solution environment context, the corresponding reordering method is invoked to select the optimal model. The multimodal characteristics of the linear equation system are automatically analyzed to select a suitable reordering method. The linear equation system is then reordered according to the selected reordering method to obtain the reordered linear equation system and the reordered sequence. In one embodiment, step S3 includes steps 31 to 33.

[0037] Step 31: Construct reordering method optimization models for different computer architectures (x86, arm64, etc.) and different computing environments (serial, multi-process, multi-threaded, etc.). The reordering method optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal reordering method through training. The trained reordering method optimization model is stored in the AI ​​model pool.

[0038] The reordering methods include rcm, 1wd, nd, qmd, metisnd, and scotchnd. Each optimized model is saved as five files: feature name file, numerical feature mean file, numerical feature standard deviation file, model file, and label mapping file. These files are stored in different folders depending on the computer architecture and computing environment. For example, the optimized models of the x86 serial reordering method are stored in the model / x86 / orderingType / seq directory.

[0039] Step 32: Based on the current solution environment context (number of processes, number of threads, instruction set architecture, etc.), call the corresponding reorder method optimization model, input the multimodal features of the linear equation system extracted in step S2 into the reorder method optimization model, and select the reorder method that is most suitable for the current linear equation system.

[0040] First, the current solution environment context (number of processes, number of threads, instruction set architecture, etc.) is obtained. Then, based on the current solution environment context and the model number used by the user, the corresponding reordering method is called to optimize the model. For example, if the current number of processes is 1, the number of threads is 1, the instruction set architecture is x86, and the model number is 0, five filenames corresponding to model number 0 are read from the file model / x86 / orderingType / seq / configure: feature name filename, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. Then, five files are read from model / x86 / orderingType / seq: feature name file, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. The features used are obtained from the multimodal features of the linear equation system extracted in step S2, and the features are normalized according to the numerical feature mean file and numerical feature standard deviation file. These features are then input into the reordering method optimization model stored in the model file to obtain the value of each category. A softmax operation is performed on each category to obtain the probability of each category, and the result with the highest probability is selected as the optimal result. Finally, the corresponding reordering method is obtained from the label mapping file based on the selected category index, thus obtaining the optimal reordering method that best suits the current system of linear equations.

[0041] Step 33: Based on the matrix data and the selected reordering method, calculate the row reordering sequence and the column reordering sequence, reorder the matrix using the row reordering sequence and the right-hand side using the row reordering sequence to obtain the reordered linear equation system.

[0042] Specifically, based on the matrix data and the preferred reordering method, `GetReorderingIndexSeries` is called to calculate the row reordering sequence `reorderingRowIS` and the column reordering sequence `reorderingColIS`. `PermuteMatrix` is then called to reorder the matrix using the obtained row reordering sequence `reorderingRowIS` and column reordering sequence `reorderingColIS`. Finally, `PermuteVector` is called to reorder the right-hand side terms using the obtained row reordering sequence `reorderingRowIS`, thus obtaining a reordered system of linear equations. Simultaneously, the obtained column reordering sequence `reorderingColIS` is stored for later use in obtaining the correct solution vector.

[0043] Step S4: Based on the current solution environment context and the type of linear equation system, call the corresponding iterative method and preconditioner combination optimization model to automatically analyze the multimodal characteristics of the linear equation system and select a suitable iterative method and preconditioner combination. In one embodiment, step S4 includes steps 41 and 42.

[0044] Step 41: Construct iterative methods and preconditioner combination optimization models for different computer architectures (x86, arm64, etc.), different computing environments (serial, multi-process, multi-threaded, etc.), and types of linear equation systems (symmetric positive definite, general asymmetric, etc.). The iterative methods and preconditioner combination optimization models are trained to learn the mapping relationship between the multimodal features of the linear equation system and the optimal iterative method and preconditioner combination. The trained iterative methods and preconditioner combination optimization models are stored in the AI ​​model pool.

[0045] Among them, for iterative methods and preconditioner combinations for symmetric positive definite linear equation systems, serial and multi-threaded methods include cg_icc, cg_jacobi, cg_ssor, cg_eisenstat, cg_gamg, and cg_boomeramg, while multi-process methods include cg_bicc, cg_bjacobi, cg_sor, cg_gamg, cg_aicc, cg_asor, cg_ajacobi, and cg_boomeramg; for iterative methods and preconditioner combinations for general asymmetric linear equation systems, serial, multi-threaded, and multi-process methods include cg_eisenstat, gmres_gamg, fbcgs_ilu, cg_ilu, fcg_gamg, dgmres_none, cr_eisenstat, gmres_ilu, bcgsl_none, cr_jacobi, minres_gamg, fbcgs_jacobi, and fgmres_gamg. Each optimized model is saved as five files: feature name file, numerical feature mean file, numerical feature standard deviation file, model file, and label mapping file. These files are stored in different folders depending on the computer architecture and computing environment. For example, the optimized model of the x86 serial iterative method and preconditioner combination is stored in the model / x86 / kspPc / seq directory.

[0046] Step 42: Based on the current solution environment context (number of processes, number of threads, instruction set architecture, etc.) and the type of linear equation system (symmetric positive definite, general asymmetric, etc.), call the corresponding reorder method optimization model. Input the multimodal features of the linear equation system extracted in step S2 into the called reorder method optimization model, and select the optimal iterative method and preconditioner combination that is most suitable for the current linear equation system.

[0047] First, the current solution environment context (number of processes, number of threads, instruction set architecture) is obtained. Then, based on the current solution environment context and the model number used by the user, the corresponding iterative method and preconditioner combination are called to optimize the model. For example, if the current number of processes is 1, the number of threads is 1, the instruction set architecture is x86, and the model number is 0, five filenames corresponding to model number 0 are read from the file model / x86 / kspPc / seq / configure: feature name filename, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. Then, five files are read from model / x86 / kspPc / seq: feature name file, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. The features used are recorded in the feature name file from the multimodal features of the linear equation system extracted in step S2. The features are normalized according to the numerical feature mean file and the numerical feature standard deviation file, and input into the reorder method optimization model stored in the model file to obtain the value of each category. Softmax is applied to obtain the probability of each category, and the result with the highest probability is selected as the optimal result. Finally, based on the selected category index, the corresponding iteration method and preconditioner combination are obtained from the label mapping file, thereby obtaining the optimal iteration method and preconditioner combination that best suits the current linear equation system.

[0048] Step S5: Based on the current solution environment context and the selected iterative method, call the corresponding iterative method parameter optimization model to automatically analyze the multimodal characteristics of the linear equation system and select suitable iterative method parameters. In one embodiment, step S5 includes steps 51 and 52.

[0049] Step 51: Construct an iterative method parameter optimization model for different computer architectures (x86, arm64, etc.), different computing environments (serial, multi-process, multi-threaded, etc.), and different iterative methods. The iterative method parameter optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal parameters of the iterative method through training. The trained iterative method parameter optimization model is stored in the AI ​​model pool.

[0050] The recommended parameters for the iterative method CG include `ksp_cg_single_reduction`, for the iterative method FCG it includes `ksp_fcg_truncation_type`, and for the iterative methods GMRES, DGMRES, and FGMRES it includes `ksp_gmres_restart`. Each optimized model is saved as five files: feature name file, numerical feature mean file, numerical feature standard deviation file, model file, and label mapping file. These files are stored in different folders depending on the computer architecture, computing environment, and iterative method. For example, the optimized model for the x86 serial CG iterative method is stored in the `model / x86 / ksp_cg_parms / seq` directory.

[0051] Step 52: Based on the current solution environment context (number of processes, number of threads, instruction set architecture) and the iterative method selected in step S4, call the corresponding iterative method parameter optimization model, input the multimodal features of the linear equation system extracted in step S2 into the called iterative method parameter optimization model, and select the optimal iterative method parameters that are most suitable for the current linear equation system.

[0052] First, obtain the current solution environment context (number of processes, number of threads, instruction set architecture). Then, based on the current solution environment context, the iteration method obtained in step S4, and the model number used by the user, call the corresponding iteration method parameters to optimize the model. For example, if the current number of processes is 1, the number of threads is 1, the instruction set architecture is x86, the iteration method is CG, and the model number is 0, read the five filenames corresponding to model number 0 from the file model / x86 / ksp_cg_parms / seq / configure: feature name filename, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. Then, read the five files under model / x86 / ksp_cg_parms / seq: feature name file, numerical feature mean file, numerical feature standard deviation file, model file, and label mapping file. The features used are obtained from the multimodal features of the linear equation system extracted in step S2, as recorded in the feature name file. These features are normalized using the numerical feature mean file and the numerical feature standard deviation file, and then input into the iterative method parameter optimization model stored in the model file. Values ​​for each category are obtained, and a softmax operation is performed to calculate the probability of each category. The result with the highest probability is selected as the optimal result. Finally, the corresponding iterative method parameters are obtained from the label mapping file based on the optimized category index, thus obtaining the optimal iterative method parameters best suited for the current linear equation system.

[0053] Step S6: Based on the current solution environment context and the selected preconditioner combination, call the corresponding preconditioner parameter optimization model to automatically analyze the multimodal characteristics of the linear equation system and select suitable preconditioner parameters. In one embodiment, step S6 includes steps 61 and 62.

[0054] Step 61: Construct preconditioner parameter optimization models for different computer architectures (x86, arm64, etc.), different computing environments (serial, multi-process, multi-threaded, etc.), and different preconditioners. The preconditioner parameter optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal preconditioner parameters through training. The trained preconditioner parameter optimization model is stored in the AI ​​model pool.

[0055] Specifically, for the ICC and ILU preconditioners, recommended parameters for serial and multi-threaded operations include `pc_factor_levels` and `pc_factor_mat_ordering_type`. For the JACOBI preconditioner, recommended parameters for serial, multi-threaded, and multi-process operations include `pc_jacobi_type` and `pc_jacobi_rowl1_scale`. For the SOR preconditioner, recommended parameters for serial and multi-process operations include `pc_sor_omega` and `pc_sor_its`. For the GAM preconditioner, recommended parameters for serial, multi-threaded, and multi-process operations include `pc_gamg_threshold`, `pc_gamg_aggressive_square_graph`, `pc_gamg_agg_nsmooths`, and `pc_gamg_aggressive_coarsening`. For the BICC and BILU preconditioners, recommended parameters for multi-process operations include `sub_pc_factor_levels` and `sub_pc_factor_mat_ordering_type`. For the recommended parameters of the BOOMERAMG preconditioner, serial, multi-threaded, and multi-process models include pc_hypre_boomeramg_cycle_type, pc_hypre_boomeramg_relax_type_all, pc_hypre_boomeramg_coarsen_type, pc_hypre_boomeramg_interp_type, pc_hypre_boomeramg_strong_threshold, and pc_hypre_boomeramg_numfunctions. Each optimized model is saved as five files: feature name file, numerical feature mean file, numerical feature standard deviation file, model file, and label mapping file. These files are stored in different folders depending on the computer architecture, computing environment, and preconditioner. For example, the optimized model of the preconditioner parameters for the x86 serial ICC preconditioner is stored in the model / x86 / pc_icc_parms / seq directory.

[0056] Step 62: Based on the current solution environment context (number of processes, number of threads, instruction set architecture, etc.) and the preconditioner combination selected in step S4, call the corresponding preconditioner parameter optimization model, input the multimodal features of the linear equation system extracted in step S2 into the called preconditioner parameter optimization model, and select the optimal preconditioner parameter that best suits the current linear equation system.

[0057] First, obtain the current solution environment context (number of processes, number of threads, instruction set architecture). Then, based on the current solution environment context, the combination of preconditions obtained in step S4, and the model number used by the user, call the corresponding precondition parameter optimization model. For example, if the current number of processes is 1, the number of threads is 1, the instruction set architecture is x86, the precondition is ICC, and the model number is 0, read the five filenames corresponding to model number 0 from the file model / x86 / pc_icc_parms / seq / configure: feature name filename, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. Then, read the five files under model / x86 / pc_icc_parms / seq: feature name filename, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. The features used are obtained from the multimodal features of the linear equation system extracted in step S2, as recorded in the feature name file. These features are normalized using the numerical feature mean and standard deviation files, and then input into the precondition subparameter optimization model stored in the model file. Values ​​for each category are obtained, and a softmax operation is performed to calculate the probability of each category. The highest probability is selected as the optimal result. Finally, the corresponding precondition subparameters are obtained from the label mapping file based on the optimized category index, thus obtaining the optimal precondition subparameters best suited for the current linear equation system.

[0058] Step S7: Based on the current solution environment context, call the corresponding sparse matrix operator optimization model to automatically analyze the multimodal characteristics of the linear equation system and select sparse matrix operators. In one embodiment, step S7 includes steps 71 and 72.

[0059] Step 71: Construct sparse matrix operator optimization models for different computer architectures (x86, arm64, etc.) and different computing environments (serial, multi-process, multi-threaded, etc.). The sparse matrix operator optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal sparse matrix operator through training. The trained sparse matrix operator optimization model is stored in the AI ​​model pool.

[0060] The sparse matrix operator kernel implementation includes COO, CSR, BSR, CSR5, DIA, ELL, S-ELL, SELL-c-σ, and SELL-cR. Each optimized model is saved as five files: feature name file, numerical feature mean file, numerical feature standard deviation file, model file, and label mapping file. These files are stored in different folders depending on the computer architecture and computing environment. For example, the optimized model for the x86 serial reordering method is stored in the model / x86 / spmv / seq directory.

[0061] Step 72: Based on the current solution environment context (number of processes, number of threads, instruction set architecture, etc.), call the corresponding sparse matrix operator optimization model, input the multimodal features of the linear equation system extracted in step S2 into the called sparse matrix operator optimization model, and select the optimal sparse matrix operator that best suits the current linear equation system.

[0062] First, the current solution environment context (number of processes, number of threads, instruction set architecture) is obtained. Then, based on the current solution environment context and the model number used by the user, the corresponding sparse matrix operator optimization model is called. For example, if the current number of processes is 1, the number of threads is 1, the instruction set architecture is x86, and the model number is 0, the five filenames corresponding to model number 0 are read from the file model / x86 / spmv / seq / configure: feature name filename, numerical feature mean filename, numerical feature standard deviation filename, model file, and label mapping filename. Then, the five files are read from model / x86 / spmv / seq. The features recorded in the feature name file are obtained from the multimodal features of the linear equation system extracted in step S2. The features are normalized according to the numerical feature mean file and the numerical feature standard deviation file, and input into the sparse matrix operator optimization model stored in the model file to obtain the value of each category. Softmax is applied to obtain the probability of each category, and the result with the highest probability is selected as the optimal result. Finally, based on the selected category index, the corresponding sparse matrix operator is obtained from the label mapping file, thus obtaining the optimal sparse matrix operator that best suits the current system of linear equations.

[0063] Step S8: Based on the selected combination of iterative method and preconditioner, iterative method parameters, and preconditioner parameters, the solver's solution options are set. The corresponding matrix format is converted and bound to the kernel based on the selected sparse matrix operator. The solver with the solution options set is then called to solve the reordered linear equation system to obtain the solution vector. Finally, the solution vector is reversed based on the reordered sequence to obtain the final solution vector. In one embodiment, step S8 includes steps 81 to 84.

[0064] Step 81: Based on the iterative method and precondition sub-combination selected in Step S4, the iterative method parameters selected in Step S5, the precondition sub-parameters selected in Step S6, the maximum number of iterations, the relative residual accuracy of iterative convergence, the absolute residual accuracy of iterative convergence, the relative residual accuracy of iterative divergence, and the residual calculation method (true residual, preprocessed residual, etc.), create a solver option configuration and configure the solver accordingly. Specifically, call `CreateIssSolveOption` to create the solver option configuration `issSolveOption`, configure the solver according to the created configuration, call `KSPSetType` to set the iterative method and corresponding functions to set the iterative method parameters, call `PCSetType` to set the precondition sub-combination and corresponding functions to set the precondition sub-parameters, call `KSPSetTolerances` to set the relative residual accuracy of iterative convergence, the absolute residual accuracy of iterative convergence, the relative residual accuracy of iterative divergence, and the maximum number of iterations, and call `KSPSetNormType` to set the residual calculation method.

[0065] Step 82: Perform the corresponding format transformation on the matrix according to the sparse matrix operator selected in step S7, and set the sparse matrix operator kernel called by the solver. Specifically, the sparse matrix operator kernel called by the solver is set by calling MatShellSetOperation.

[0066] Step 83: Call the configured solver to solve the reordered linear equations obtained in step S3, and obtain the solution vector. Specifically, call KSPSolve to use the configured solver to solve the reordered linear equations obtained in step S3, and obtain the solution vector.

[0067] Step 84: Reverse the reordering sequence obtained in step S3 to obtain the final solution vector. Specifically, PermuteVector is called to use the column reordering sequence reorderingColIS obtained in step S3 to reverse the reordering sequence of the solution vector to obtain the final solution vector.

[0068] The above-described adaptive solution method for linear equations based on a multi-task-aware AI model pool achieves the following advantages compared to existing technologies: (1) By integrating the separate decision-making tasks such as preprocessing, algorithm selection, and parameter tuning into a unified framework, intelligent decision-making and collaborative optimization throughout the entire process are realized through a multi-task-aware AI model pool and intelligent scheduling mechanism.

[0069] (2) Adaptive decision-making based on the multimodal features of the matrix and right-hand side can accurately match the optimal solution strategy for equation systems with different characteristics, thereby significantly reducing the number of iteration steps, reducing computation time, and making full use of hardware computing resources to improve the overall performance of solving large-scale sparse linear equation systems.

[0070] (3) Users do not need to have a strong background in numerical computing or perform tedious parameter tuning. The system can automatically complete the entire process from feature analysis to solution strategy generation, which greatly reduces the technical threshold and manual intervention cost of large-scale scientific computing and engineering simulation.

[0071] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0072] Based on the same inventive concept, this application also provides an adaptive solution system for linear equations based on a multi-task-aware AI model pool, used to implement the aforementioned adaptive solution method for linear equations based on a multi-task-aware AI model pool. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the adaptive solution system for linear equations based on a multi-task-aware AI model pool provided below can be found in the limitations of the adaptive solution method for linear equations based on a multi-task-aware AI model pool described above, and will not be repeated here.

[0073] In one embodiment, such as Figure 2 As shown, an adaptive solution system for linear equations based on a multi-task-aware AI model pool is provided, including: The first module 1 is used to obtain the matrix data and right-hand side data of the input linear equation system to be solved.

[0074] The second module 2 is used to extract multimodal features from matrix data and right-hand side data to obtain multimodal features of the linear equation system.

[0075] The third module 3 is used to call the corresponding reordering method to select the optimal model according to the current solution environment context, automatically analyze the multimodal characteristics of the linear equation system to select a suitable reordering method, and reorder the linear equation system according to the selected reordering method to obtain the reordered linear equation system and the reordered sequence.

[0076] Module 4 is used to call the corresponding iterative method and preconditioner combination optimization model according to the current solution environment context and the type of linear equation system, and automatically analyze the multimodal characteristics of the linear equation system to select a suitable iterative method and preconditioner combination.

[0077] Module 5 is used to call the corresponding iterative method parameter optimization model based on the current solution environment context and the selected iterative method, and automatically analyze the multimodal characteristics of the linear equation system to select suitable iterative method parameters.

[0078] Module 6 is used to automatically analyze the multimodal characteristics of the linear equation system and select appropriate precondition parameters by calling the corresponding precondition parameter optimization model based on the current solution environment context and the selected precondition combination.

[0079] Module 7 is used to call the corresponding sparse matrix operator optimization model according to the current solution environment context, and automatically analyze the multimodal features of the linear equation system to select sparse matrix operators.

[0080] Module 8 is used to set the solver's solution options based on the selected combination of iterative methods and preconditioners, iterative method parameters, and preconditioner parameters. It performs corresponding matrix format conversion and kernel binding based on the selected sparse matrix operators, calls the solver with the solution options set to solve the reordered linear equation system to obtain the solution vector, and then reverses the reordered sequence of the solution vector to obtain the final solution vector.

[0081] The modules in the aforementioned adaptive solution system for linear equations based on a multi-task perceptual AI model pool can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0082] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an adaptive solution method for linear equations based on a multi-task perceptual AI model pool. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0083] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0084] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.

[0085] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0086] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described above.

[0087] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0088] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0089] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. An adaptive solution method for linear equation systems based on a multi-task-aware AI model pool, characterized in that, include: Obtain the matrix data and right-hand side terms of the input linear equation system to be solved; Multimodal features are extracted from matrix data and right-hand side data to obtain multimodal features of the linear equation system; Based on the current solution environment context, the corresponding reordering method is invoked to select the optimal model. The multimodal characteristics of the linear equation system are automatically analyzed to select a suitable reordering method. The linear equation system is then reordered according to the selected reordering method to obtain the reordered linear equation system and the reordered sequence. Based on the current solution environment context and the type of linear equation system, the corresponding iterative method and precondition sub-combination optimization model are invoked to automatically analyze the multimodal characteristics of the linear equation system and select a suitable iterative method and precondition sub-combination. Based on the current solution environment context and the selected iteration method, the corresponding iteration method parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select appropriate iteration method parameters. Based on the current solution environment context and the selected preconditioner combination, the corresponding preconditioner parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select suitable preconditioner parameters. Based on the current solution environment context, the corresponding sparse matrix operator optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select sparse matrix operators. Based on the selected combination of iterative methods and preconditioners, the parameters of the iterative methods and the parameters of the preconditioners, the solver is configured with solution options. Based on the selected sparse matrix operators, the corresponding matrix format is converted and the kernel is bound. The solver with the solution options configured is called to solve the reordered linear equation system to obtain the solution vector. Then, the solution vector is reversed based on the reordered sequence to obtain the final solution vector.

2. The method according to claim 1, characterized in that, Obtain the matrix data and right-hand side terms of the input linear equation system to be solved, including: If matrix data and right-hand side data are read from an MTX file, the MTX file header type information is parsed to identify the data storage method, real and complex numbers, and matrix type. Then, the number of rows and columns of the matrix and the number of non-zero elements and the specific data are read. If the data read from the MTX file, the COO format data, or the CSR format data only exists in the main process, the data is evenly divided according to the number of rows, and the main process distributes the corresponding data to each process.

3. The method according to claim 1, characterized in that, The multimodal features of the linear equation system include numerical features and modal features. Modal features are... The matrix is ​​compressed into a 128*128 multi-channel image. Each pixel corresponds to each block of the original matrix in a 128*128 block matrix. The channels include the number of non-zero elements, the proportion of non-zero elements, the number of non-zero elements on the diagonal, the maximum value of non-zero elements, and the maximum value of non-zero elements on the diagonal.

4. The method according to claim 1, characterized in that, Based on the current solution environment context, the corresponding reordering method is invoked to select the optimal model. The multimodal characteristics of the linear equation system are automatically analyzed to select a suitable reordering method. The linear equation system is then reordered according to the selected reordering method to obtain a reordered linear equation system and a reordered sequence, including: For different computer architectures and computing environments, a reordering method optimization model is constructed. The reordering method optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal reordering method through training. Based on the current solution environment context, the corresponding reorder method optimization model is invoked, and the multimodal features of the linear equation system are input into the invoked reorder method optimization model to select the most suitable reorder method for the current linear equation system. Based on the matrix data and the selected reordering method, the row reordering sequence and column reordering sequence are calculated. The matrix is ​​then reordered using the row reordering sequence and column reordering sequence. The right-hand side terms are then reordered using the row reordering sequence, resulting in a reordered linear equation system.

5. The method according to claim 1, characterized in that, Based on the current solution environment context and the type of linear equation system, the corresponding iterative method and precondition sub-combination optimization model are invoked to automatically analyze the multimodal characteristics of the linear equation system and select suitable iterative methods and precondition sub-combinations, including: For different computer architectures, different computing environments and types of linear equation systems, an optimal model for iterative methods and precondition sub-combinations is constructed. The optimal model for iterative methods and precondition sub-combinations learns the mapping relationship between the multimodal features of linear equation systems and the optimal iterative methods and precondition sub-combinations through training. Based on the current solution environment context and the type of linear equation system, the corresponding reorder method optimization model is invoked. The multimodal characteristics of the linear equation system are input into the invoked reorder method optimization model, and the optimal iterative method and preconditioner combination that best suits the current linear equation system is selected.

6. The method according to claim 1, characterized in that, Based on the current solution environment context and the selected iterative method, the corresponding iterative method parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select suitable iterative method parameters, including: For different computer architectures, different computing environments and different iterative methods, an optimal model for the parameters of the iterative method is constructed. The optimal model for the parameters of the iterative method learns the mapping relationship between the multimodal features of the linear equation system and the optimal parameters of the iterative method through training. Based on the current solution environment context and the selected iterative method, the corresponding iterative method parameter optimization model is invoked. The multimodal characteristics of the linear equation system are input into the invoked iterative method parameter optimization model, and the optimal iterative method parameters that best suit the current linear equation system are selected.

7. The method according to claim 1, characterized in that, Based on the current solution environment context and the selected preconditioner combination, the corresponding preconditioner parameter optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select suitable preconditioner parameters, including: For different computer architectures, different computing environments and different preconditioners, a preconditioner parameter optimization model is constructed. The preconditioner parameter optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal preconditioner parameters through training. Based on the current solution environment context and the selected preconditioner combination, the corresponding preconditioner parameter optimization model is invoked. The multimodal characteristics of the linear equation system are input into the invoked preconditioner parameter optimization model, and the optimal preconditioner parameter that best suits the current linear equation system is selected.

8. The method according to claim 1, characterized in that, Based on the current solution environment context, the corresponding sparse matrix operator optimization model is invoked to automatically analyze the multimodal characteristics of the linear equation system and select sparse matrix operators, including: For different computer architectures and computing environments, a sparse matrix operator optimization model is constructed. The sparse matrix operator optimization model learns the mapping relationship between the multimodal features of the linear equation system and the optimal sparse matrix operator through training. Based on the current solution environment context, the corresponding sparse matrix operator optimization model is invoked. The multimodal features of the linear equation system are input into the invoked sparse matrix operator optimization model, and the optimal sparse matrix operator that best suits the current linear equation system is selected.

9. The method according to claim 1, characterized in that, Based on the selected combination of iterative methods and preconditioners, the iterative method parameters, and the preconditioner parameters, the solver's solution options are set. The selected sparse matrix operators are used for corresponding matrix format conversion and kernel binding. The solver with the set solution options is then called to solve the reordered linear equation system to obtain the solution vector. Finally, the solution vector is reversed based on the reordered sequence to obtain the final solution vector, including: Create a solver option configuration based on the selected iterative method and preconditioner, iterative method parameters, preconditioner parameters, maximum number of iterations, relative residual accuracy of iterative convergence, absolute residual accuracy of iterative convergence, relative residual accuracy of iterative divergence, and residual calculation method, and set the solver according to the created solver option configuration; The matrix is ​​transformed into the corresponding format according to the selected sparse matrix operator, and the kernel of the sparse matrix operator called by the solver is set. The pre-configured solver is invoked to solve the reordered linear equation system, and the solution vector is obtained. The solution vectors obtained by reordering are reversed according to the reordered sequence to obtain the final solution vector.

10. An adaptive solution system for linear equations based on a multi-task-aware AI model pool, characterized in that, include: The first module is used to obtain the matrix data and right-hand side data of the input linear equation system to be solved; The second module is used to extract multimodal features from matrix data and right-hand side data to obtain multimodal features of the linear equation system. The third module is used to call the corresponding reordering method to select the optimal model according to the current solution environment context, automatically analyze the multimodal characteristics of the linear equation system to select a suitable reordering method, and reorder the linear equation system according to the selected reordering method to obtain the reordered linear equation system and the reordered sequence. The fourth module is used to call the corresponding iterative method and precondition sub-combination optimization model according to the current solution environment context and the type of linear equation system, and to automatically analyze the multimodal characteristics of the linear equation system to select a suitable iterative method and precondition sub-combination. The fifth module is used to call the corresponding iterative method parameter optimization model according to the current solution environment context and the selected iterative method, and automatically analyze the multimodal characteristics of the linear equation system to select suitable iterative method parameters. The sixth module is used to call the corresponding precondition subparameter optimization model based on the current solution environment context and the selected precondition subcombination, and to automatically analyze the multimodal characteristics of the linear equation system to select suitable precondition subparameters. The seventh module is used to call the corresponding sparse matrix operator optimization model according to the current solution environment context, and automatically analyze the multimodal characteristics of the linear equation system to select sparse matrix operators. The eighth module is used to set the solver's solution options based on the selected combination of iterative methods and preconditioners, the parameters of the iterative methods, and the parameters of the preconditioners. It performs corresponding matrix format conversion and kernel binding based on the selected sparse matrix operators, calls the solver with the solution options set to solve the reordered linear equation system to obtain the solution vector, and then reverses the reordered sequence of the solution vector to obtain the final solution vector.