Processing method and device for sparse linear system, equipment and medium

By extracting and learning the relative and absolute features of sparse matrices, and combining convolutional neural networks and linear layers to select the optimal iterative method, the problem of low computational efficiency of sparse linear systems in existing technologies is solved, and more efficient iterative solutions are achieved.

CN120913016APending Publication Date: 2025-11-07粤港澳大湾区(广东)国创中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510881079.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing technologies have limitations in feature extraction when iteratively solving sparse linear systems, resulting in poor computational efficiency and failing to meet the needs of large-scale computing.

Method used

By extracting features from the sparse matrix, relative and absolute features are obtained. These features are then processed using convolutional neural networks and linear layers, and the optimal iterative method is selected for solving the problem.

Benefits of technology

It improves the accuracy of iterative method selection, reduces the solution time for linear systems, and enhances computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120913016A_ABST
    Figure CN120913016A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a processing method and device for a sparse linear system, electronic equipment and a storage medium, and relates to the technical field of data processing, and the method comprises the steps: achieving the comprehensive representation of a matrix through the simultaneous processing of the relative features and absolute features of the sparse matrix in the processing process of the sparse matrix, and improving the processing precision of the sparse linear system. And the iterative method is selected based on the fused features, so that the selection accuracy of the iterative method can be remarkably improved, the solving time of a linear system is shortened, and the calculation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a processing method for a sparse linear system, a processing device for a sparse linear system, an electronic device and a computer readable storage medium. BACKGROUND

[0002] In the field of scientific computing, solving sparse linear systems Ax = b is a fundamental and core task, especially in scenarios involving large-scale discretization computations or network analysis, such as scientific and engineering computations, computer graphics, network and graph theory, data science and machine learning, optimization and operations research, etc.

[0003] For example, in structural analysis software, finite element analysis requires solving large-scale sparse linear systems composed of discretization equations to simulate the deformation and stress distribution of buildings, bridges and mechanical components under various load conditions. In computational fluid dynamics software, numerical solution of the Navier-Stokes equation also relies on efficient sparse linear system solvers to simulate fluid flow, heat conduction and aerospace design; in power system simulation software, power grid state estimation and power flow analysis require repeated solution of large-scale sparse linear equations, which is crucial for power grid planning and operation decision-making; electronic design automation software in semiconductor design tools also relies heavily on efficient sparse linear system solvers for circuit simulation and verification.

[0004] Among them, in the process of solving sparse linear systems, direct solution method can be used to obtain the corresponding analytical solution, or iterative solution method can be used to obtain the corresponding approximate solution. For large-scale systems, solving Ax = b is extremely intensive in terms of computing resource consumption, especially in reservoir engineering application scenarios, which usually accounts for more than 70% of the total computing time. Based on this, the significant computational burden makes the direct solution method unable to be widely used in practical applications, and the iterative solution method shows limited robustness in practical applications, therefore, it is necessary to choose the appropriate iterative solution method in practical applications.

[0005] However, even if the image-based selection method selects the corresponding iterative solution method for analysis, there are limitations in feature extraction, and the selection accuracy is not good, so that the solving performance is not good, and the expected computing efficiency cannot be achieved. SUMMARY

[0006] The embodiments of the present application provide a processing method, device, electronic device and computer readable storage medium for a sparse linear system to solve or partially solve the problem of limitations in selecting an iterative solution method based on an image-based selection method.

[0007] The embodiment of the present application discloses a processing method for sparse linear system, comprising:

[0008] Obtaining scene data for representing a target scene in a target software system, and determining a target sparse matrix corresponding to the target scene according to the scene data;

[0009] Converting the target sparse matrix into a plurality of pixel sub-blocks;

[0010] Performing feature extraction on the pixel sub-blocks to obtain relative features corresponding to the target sparse matrix, and learning the relative features to obtain a relative feature vector corresponding to the target sparse matrix;

[0011] Performing feature extraction on the target sparse matrix to obtain absolute features corresponding to the target sparse matrix, and learning the absolute features to obtain an absolute feature vector corresponding to the target sparse matrix;

[0012] Inputting the relative feature vector and the absolute feature vector into a target iterative method selection model to output a target iterative method for the target sparse matrix;

[0013] Solving the target sparse matrix according to the target iterative method to obtain a scene feature corresponding to the target scene.

[0014] In some feasible implementation manners, the target scene at least includes one of a structural analysis scene, a fluid dynamics calculation scene, an electric power system simulation scene, and an electronic design automation scene; wherein the scene data at least includes one or more of the following:

[0015] Geometric data, material properties, boundary conditions, load data, and matrix elements matched with the structural analysis scene; grid data, fluid properties, boundary conditions, state variables, matrix characteristics, and auxiliary data matched with the fluid dynamics calculation scene; network topology, electrical parameters, operation data, matrix type, and correction amount matched with the electric power system simulation scene; circuit elements, connection relationship between the circuit elements, excitation signal, and matrix form matched with the electronic design automation scene.

[0016] In some feasible implementation manners, the conversion of the target sparse matrix into a plurality of pixel sub-blocks comprises:

[0017] Obtaining an image resolution for the target sparse matrix;

[0018] Converting the target sparse matrix into a corresponding target image;

[0019] The target image is divided into a plurality of pixel sub-blocks according to the image resolution, and each pixel sub-block corresponds to a pixel point in the target image.

[0020] In some possible implementation manners, the feature extraction on the pixel sub-blocks to obtain the relative features corresponding to the target sparse matrix comprises:

[0021] RGB channel information corresponding to each pixel sub-block is obtained, and the RGB channel information at least includes red channel information and green channel information.

[0022] The relative magnitude size of the target sparse matrix is obtained by calculation according to the red channel information.

[0023] The distribution density of the target sparse matrix is obtained by calculation according to the green channel information.

[0024] The m*m*2-dimensional image representation corresponding to the target sparse matrix is generated by calculation using the relative magnitude size and the distribution density, and the image representation is taken as the relative features corresponding to the target sparse matrix, and m corresponds to the image resolution.

[0025] In some possible implementation manners, the relative feature vector is a 256-dimensional relative feature vector, and the learning of the relative features to obtain the relative feature vector corresponding to the target sparse matrix comprises:

[0026] A 3*3 convolution kernel for the relative features is obtained.

[0027] The relative features are convoluted using the 3*3 convolution kernel to output 32 first feature maps.

[0028] A sampling window for the first feature maps is determined.

[0029] Each first feature map is subjected to a pooling process according to the sampling window to obtain a first target feature map corresponding to the first feature map after dimension reduction.

[0030] The first target feature map is convoluted using the 3*3 convolution kernel to output 64 second feature maps, and each second feature map is subjected to a pooling process according to the sampling window to obtain a second target feature map corresponding to the second feature map after dimension reduction.

[0031] The second target feature map is converted into a 256-dimensional relative feature vector.

[0032] In some possible implementation manners, the absolute features at least include matrix dimensions of the target sparse matrix, a block size of the pixel sub-block, a maximum matrix element value, a minimum matrix element value, a minimum value of the pixel sub-block, and a maximum value of the pixel sub-block, the absolute feature vector is a 256-dimensional absolute feature vector, and the learning of the absolute features to obtain the absolute feature vector corresponding to the target sparse matrix comprises the following steps.

[0033] The matrix dimensions, the block size, the maximum matrix element value, the minimum matrix element value, the minimum value of the pixel sub-block, and the maximum value of the pixel sub-block are expanded into a 256-dimensional absolute feature vector.

[0034] In some possible implementation manners, the inputting of the relative feature vector and the absolute feature vector into the target iterative method selection model to output the target iterative method for the target sparse matrix comprises the following steps.

[0035] A linear layer for the target sparse feature is determined, the linear layer at least includes a first linear layer and a second linear layer, and the second linear layer at least includes a plurality of neurons, each of the neurons corresponding to a candidate iterative method.

[0036] The 256-dimensional relative feature vector and the 256-dimensional absolute feature vector are fused through the first linear layer to obtain a fusion feature corresponding to the target sparse matrix.

[0037] The fusion feature is input into the second linear layer for mapping to obtain a probability distribution for the neurons, and a candidate iterative method with the highest probability is selected from the candidate iterative methods as the target iterative method for the target sparse matrix according to the probability distribution.

[0038] The embodiment of the application further discloses a processing device for a sparse linear system, comprising:

[0039] A data acquisition module is configured to acquire scene data used for representing a target scene in a target software system, and determine a target sparse matrix corresponding to the target scene according to the scene data.

[0040] A matrix conversion module is configured to convert the target sparse matrix into a plurality of pixel sub-blocks.

[0041] A relative feature extraction module is configured to perform feature extraction on the pixel sub-blocks to obtain relative features corresponding to the target sparse matrix, and learn the relative features to obtain a relative feature vector corresponding to the target sparse matrix.

[0042] An absolute feature extraction module is configured to perform feature extraction on the target sparse matrix to obtain an absolute feature corresponding to the target sparse matrix, and learn the absolute feature to obtain an absolute feature vector corresponding to the target sparse matrix.

[0043] A method selection module is configured to input the relative feature vector and the absolute feature vector into a target iterative method selection model to output a target iterative method for the target sparse matrix.

[0044] A solving module is configured to solve the target sparse matrix according to the target iterative method to obtain a scene feature corresponding to the target scene.

[0045] In some possible implementation manners, the target scene includes at least one of a structural analysis scene, a fluid dynamics calculation scene, an electric power system simulation scene, and an electronic design automation scene; and the scene data includes at least one or more of the following:

[0046] geometric data, material properties, boundary conditions, load data, and matrix elements corresponding to the structural analysis scene; mesh data, fluid properties, boundary conditions, state variables, matrix features, and auxiliary data corresponding to the fluid dynamics calculation scene; network topology, electrical parameters, operation data, matrix types, and correction amounts corresponding to the electric power system simulation scene; and circuit elements, connection relationships between the circuit elements, excitation signals, and matrix forms corresponding to the electronic design automation scene.

[0047] In some possible implementation manners, the matrix conversion module is specifically configured to:

[0048] obtain an image resolution for the target sparse matrix;

[0049] convert the target sparse matrix into a corresponding target image;

[0050] divide the target image into a plurality of pixel sub-blocks according to the image resolution, and each pixel sub-block corresponds to a pixel point in the target image.

[0051] In some possible implementation manners, the relative feature extraction module is specifically configured to:

[0052] obtain RGB channel information corresponding to each pixel sub-block, and the RGB channel information includes at least red channel information and green channel information;

[0053] perform calculation according to the red channel information to obtain a relative magnitude of the target sparse matrix;

[0054] According to the green channel information, a distribution density of the target sparse matrix is obtained by calculation;

[0055] According to the relative magnitude and the distribution density, an m*m*2-dimensional image representation corresponding to the target sparse matrix is generated by calculation, and the image representation is taken as a relative feature corresponding to the target sparse matrix, where m and the image resolution correspond respectively.

[0056] In some possible implementation manners, the relative feature vector is a 256-dimensional relative feature vector, and the relative feature extraction module is specifically configured to:

[0057] A 3*3 convolution kernel for the relative feature is obtained;

[0058] The 3*3 convolution kernel is used to perform convolution processing on the relative feature, and 32 first feature maps are output;

[0059] A sampling window for the first feature maps is determined;

[0060] Each of the first feature maps is subjected to pooling processing according to the sampling window, and a first target feature map corresponding to the first feature maps after dimension reduction is obtained;

[0061] The 3*3 convolution kernel is used to perform convolution processing on the first target feature map, 64 second feature maps are output, and each of the second feature maps is subjected to pooling processing according to the sampling window, and a second target feature map corresponding to the second feature maps after dimension reduction is obtained;

[0062] The second target feature map is converted into a 256-dimensional relative feature vector.

[0063] In some possible implementation manners, the absolute feature at least includes a matrix dimension of the target sparse matrix, a block size of the pixel sub-block, a maximum matrix element value, a minimum matrix element value, a minimum value of the pixel sub-block, and a maximum value of the pixel sub-block, and the absolute feature vector is a 256-dimensional absolute feature vector, and the absolute feature extraction module is specifically configured to:

[0064] The matrix dimension, the block size, the maximum matrix element value, the minimum matrix element value, the minimum value of the pixel sub-block, and the maximum value of the pixel sub-block are expanded into a 256-dimensional absolute feature vector.

[0065] In some possible implementation manners, the method selection module is specifically configured to:

[0066] A linear layer for the target sparse feature is determined, and the linear layer at least includes a first linear layer and a second linear layer, and the second linear layer at least includes a plurality of neurons, and each of the neurons corresponds to a candidate iterative method.

[0067] fusing the 256-dimensional relative feature vector and the 256-dimensional absolute feature vector through the first linear layer to obtain fused features corresponding to the target sparse matrix;

[0068] inputting the fused features into the second linear layer for mapping to obtain a probability distribution for the neuron, and selecting a candidate iterative method with the highest probability from the candidate iterative methods as a target iterative method for the target sparse matrix according to the probability distribution.

[0069] The embodiment of the application further discloses an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;

[0070] The memory is used for storing a computer program.

[0071] The processor is used for executing the program stored on the memory to realize the method as described in the embodiment of the application.

[0072] The embodiment of the application further discloses a computer readable storage medium, which stores instructions, and when executed by one or more processors, causes the processor to execute the method as described in the embodiment of the application.

[0073] The embodiment of the application has the following advantages:

[0074] In the embodiment of the application, by acquiring scene data for representing a target scene in a target software system, and determining a target sparse matrix corresponding to the target scene according to the scene data, then converting the target sparse matrix into a plurality of pixel subblocks, on one hand, the pixel subblocks are subjected to feature extraction to obtain relative features corresponding to the target sparse matrix, and the relative features are learned to obtain a relative feature vector corresponding to the target sparse matrix, on the other hand, the target sparse matrix is subjected to feature extraction to obtain absolute features corresponding to the target sparse matrix, and the absolute features are learned to obtain an absolute feature vector corresponding to the target sparse matrix, then the relative feature vector and the absolute feature vector are input into a target iterative method selection model to output a target iterative method for the target sparse matrix, and then the target sparse matrix is solved according to the target iterative method to obtain scene features corresponding to the target scene, by simultaneously processing the relative features and the absolute features of the sparse matrix, comprehensive representation of the matrix is realized, and selection of the iterative method based on the fused features can significantly improve the accuracy of the iterative method selection, reduce the linear system solving time, and improve the calculation efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0075] Figure 1is a step flow chart of a processing method for a sparse linear system provided in an embodiment of the present application;

[0076] Figure 2 is a schematic diagram of feature extraction provided in an embodiment of the present application;

[0077] Figure 3 is a flowchart of an iterative method selection provided in an embodiment of the present application;

[0078] Figure 4 is a structural block diagram of a processing device for a sparse linear system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0080] As an example, as the industrial model progresses demand continues to increase, and the application scene is increasingly complex, the scale and solution frequency of the sparse linear system grows exponentially, and in the related art, the iterative method of the sparse linear system is manually selected, which has been difficult to adapt to the high-performance computing demand of modern industrial software. Therefore, there is an urgent need for a method that can efficiently and automatically select an iterative method to optimize the performance of industrial software and improve the overall operating efficiency of industrial design, simulation and optimization software.

[0081] To this end, in the present application, by obtaining scene data for representing a target scene in a target software system, and determining a target sparse matrix corresponding to the target scene according to the scene data, then converting the target sparse matrix into a plurality of pixel sub-blocks, on the one hand, the pixel sub-blocks are subjected to feature extraction to obtain relative features corresponding to the target sparse matrix, and the relative features are learned to obtain a relative feature vector corresponding to the target sparse matrix, on the other hand, the target sparse matrix is subjected to feature extraction to obtain absolute features corresponding to the target sparse matrix, and the absolute features are learned to obtain an absolute feature vector corresponding to the target sparse matrix, then the relative feature vector and the absolute feature vector are input into a target iterative method selection model to output a target iterative method for the target sparse matrix, and then the target sparse matrix is solved according to the target iterative method to obtain scene features corresponding to the target scene, by simultaneously processing the relative features and the absolute features of the sparse matrix, a comprehensive representation of the matrix is realized, and based on the fused features, the selection of the iterative method can significantly improve the accuracy of the iterative method selection, reduce the linear system solving time, and improve the computing efficiency.

[0082] Reference Figure 1 , shows a step flow chart of a processing method for a sparse linear system provided in an embodiment of the present application, which can specifically include the following steps:

[0083] In step 101, scene data for representing a target scene in a target software system is acquired, and a target sparse matrix corresponding to the target scene is determined according to the scene data;

[0084] In the embodiments of the present application, the sparse linear system can be a data processing system applied in corresponding industrial software. By solving the sparse matrix, large-scale discretized data calculation or network analysis can be realized, so that the scene characteristics corresponding to the application scene can be obtained based on the results of the solving, so as to make further data analysis based on the scene characteristics, such as structural analysis, fluid dynamics, power system simulation, and electronic design automation, etc. The present application does not limit this.

[0085] The target software system can be an industrial software system for realizing application scenes such as structural analysis, fluid dynamics, power system simulation, and electronic design automation. In the corresponding application scene, the target software system can acquire scene data representing the corresponding target scene, and determine the corresponding target sparse matrix according to the scene data, so as to obtain the scene characteristics corresponding to the scene data by solving the target sparse matrix.

[0086] Alternatively, as mentioned above, the target scene can include at least one of a structural analysis scene, a fluid dynamics calculation scene, a power system simulation scene, and an electronic design automation scene. The scene data can include at least one or more of the following: geometric data, material properties, boundary conditions, load data, and matrix elements matched with the structural analysis scene; grid data, fluid properties, boundary conditions, state variables, matrix characteristics, and auxiliary data matched with the fluid dynamics calculation scene; network topology, electrical parameters, operating data, matrix type, and correction amount matched with the power system simulation scene; and circuit elements, connection relationship between circuit elements, excitation signal, and matrix form matched with the electronic design automation scene. The present application does not limit this.

[0087] For example, for the structural analysis scene, the deformation and stress distribution of a building, a bridge, or a mechanical component under load are simulated, and a stiffness matrix is generated by discretization. The matrix type of the sparse matrix involved can be symmetric positive definite (statics problem) or symmetric indefinite (dynamics problem), etc. The sparse mode can be that the non-zero elements are concentrated near the main diagonal (band sparsity), to reflect the mechanical coupling of adjacent nodes. The corresponding typical model can be 106*106, with a non-zero element ratio of about 0.1%, etc. The solving method of the sparse matrix can include the preconditioned conjugate gradient method or the direct method, etc. The physical mapping examples can be: red channel (data mean)-high stress area, green channel (sparsity density)-grid refinement area (non-zero element dense), etc.

[0088] For computational fluid dynamics, which mainly solves Navier-Stokes equations to simulate fluid flow, heat conduction, etc., the discretization generates Jacobian matrix or convection-diffusion matrix, etc. Among them, the matrix type of the sparse matrix involved can be highly asymmetric (convection term dominant) or symmetric (diffusion term dominant); the sparse mode can be asymmetric distribution of non-zero elements (depending on the direction of the flow field), there can be long-distance coupling (such as global pressure correction); the corresponding typical scale can be: 107*107, the proportion of non-zero elements varies with the type of grid, etc. For the solving method of sparse matrix, it can be through preconditioning and parallel computing, that is, it can be through ILU (Incomplete LU Factorization, incomplete LU decomposition) decomposition or multi-grid method to process strong convection problem, and partitioning solving (such as domain decomposition of PETSc (Portable, Extensible Toolkit for Scientific Computation)) etc., the physical mapping examples can be red channel (logarithmic mean)-high-speed flow area (high dynamic range velocity field), green channel (sparse density)-shock or boundary layer (local grid encryption) etc.

[0089] For power system simulation, the coefficient matrix involved can include the node admittance matrix or Jacobian matrix required to solve the power flow calculation or state estimation of the power grid. Among them, the matrix type of the sparse matrix can be complex symmetric (admittance matrix) or real asymmetric (Jacobian matrix); the sparse mode can be consistent with the power grid topology (bus connection branch determines the non-zero position); the corresponding typical scale can be: 105*105, the proportion of non-zero elements is about 0.01%. For the solving method of sparse matrix, it can be through symbolic decomposition optimization: node numbering method (such as Minimum Degree) to reduce the fill-in element, and complex processing (split into real and imaginary part block solving) etc., the corresponding physical mapping examples can be: blue channel (matrix order)-power grid scale (such as regional power grid vs. national power grid), green channel (sparse density)-hub substation (connection branch is more) etc.

[0090] For electronic design automation, a large-scale linear system needs to be solved in the process of circuit simulation to describe the interconnection relationship of elements such as transistors, capacitors, etc. Among them, the matrix type of the sparse matrix can be highly asymmetric and nonlinear (transient analysis); the sparse mode can be locally dense (such as transistor model subcircuit), overall sparse; the corresponding typical scale can be: 108*108, irregular distribution of non-zero elements, etc. For the solving method of sparse matrix, it can be through dynamic sparse solving and mixed precision solving, etc., the corresponding physical mapping examples can be: red channel (numerical mean)-high voltage node, green channel (sparse density)-logic gate cluster (dense interconnection) etc.

[0091] It should be noted that in the above different application scenarios, the physical mapping example can map the mathematical characteristics (such as numerical distribution, sparse mode, etc.) of the sparse matrix to the visualization characteristics in the image through the color channel (RGB), and is associated with the key attributes in the actual physical scene. This mapping enables the abstract matrix data to intuitively reflect the characteristics of the physical problem, helping users quickly understand the engineering significance behind the matrix.

[0092] In the embodiments of the present application, for different application scenarios, the scene data involved is different, the corresponding sparse matrix may be different, and the corresponding solving method may also be different, therefore, by extracting features of the sparse matrix to determine a suitable iterative method, solving the sparse matrix can effectively guarantee the accuracy and efficiency of the solution.

[0093] Step 102, converting the target sparse matrix into a plurality of pixel sub-blocks;

[0094] In the embodiments of the present application, the target sparse matrix is converted into a plurality of pixel sub-blocks, so as to construct the sparse matrix into a graph representation with topological representation, and introduce a graph neural network to select an iterative method. Alternatively, the image resolution for the target sparse matrix can be obtained first, then the target sparse matrix is converted into a corresponding target image, and then the target image is divided into a plurality of pixel sub-blocks according to the image resolution, each pixel sub-block corresponding to a pixel point in the target image, so that the large matrix is decomposed into a grid of small matrices, which is not only beneficial to storage, but also beneficial to improving the calculation efficiency.

[0095] For example, if the image resolution is set to 256x256, the input sparse matrix A will be divided into 256x256 sub-blocks. For a sparse matrix of size 10000x10000, each sub-block will contain approximately (10000 / 256)x(10000 / 256)≈39x39 matrix elements. The mapping between the matrix elements and the matrix sub-blocks is linear, and the position of the matrix element can be determined by division and rounding.

[0096] Step 103, extracting features of the pixel sub-blocks, obtaining the relative features corresponding to the target sparse matrix, and learning the relative features to obtain the relative feature vector corresponding to the target sparse matrix;

[0097] For the target sparse matrix, relative features and absolute features can be extracted to comprehensively represent the target sparse matrix. The relative features can capture the spatial patterns of the matrix through a convolutional neural network, and the absolute features can extract key numerical information corresponding to the target sparse matrix, so as to select an iterative method based on the fused features, thereby reducing the time for solving the linear system and improving the calculation efficiency.

[0098] In the process of extracting the relative features, the relative features corresponding to the target sparse matrix can be obtained by extracting features from the pixel sub-blocks. Then, the relative features are learned to obtain a relative feature vector corresponding to the target sparse matrix, so as to obtain a relative feature representation corresponding to the target sparse matrix.

[0099] In some possible implementation manners, in the process of extracting the relative features from the target sparse matrix by the convolutional neural network, RGB channel information corresponding to each pixel sub-block can be obtained first, the RGB channel information at least including red channel information and green channel information. Then, the relative magnitude of the target sparse matrix is obtained by calculating according to the red channel information. The distribution density of the target sparse matrix is obtained by calculating according to the green channel information. The m*m*2-dimensional image representation corresponding to the target sparse matrix is generated by calculating the relative magnitude and the distribution density, and the image representation is taken as the relative feature corresponding to the target sparse matrix, and m corresponds to the image resolution.

[0100] After the relative features are extracted, the relative features can be further learned to obtain a corresponding relative feature vector. The relative feature vector can be a 256-dimensional relative feature vector. A 3*3 convolution kernel for the relative features can be obtained first. Then, the relative features are convolved by using the 3*3 convolution kernel to output 32 first feature maps. A sampling window for the first feature maps is determined. Then, each first feature map is pooled according to the sampling window to obtain a first target feature map corresponding to the first feature map in a reduced dimension. The first target feature map is convolved again by using the 3*3 convolution kernel to output 64 second feature maps. Each second feature map is pooled according to the sampling window to obtain a second target feature map corresponding to the second feature map in a reduced dimension. Finally, the second target feature map is converted into a 256-dimensional relative feature vector.

[0101] The convolution kernel can be a convolution network used for processing the image representation, and the sampling window can be a maximum pooling window used for pooling processing of the feature map. For example, the step length of the pooling operation is assumed to be 2, that is, the sampling window moves 2 units at a time. For each 2*2 region, the maximum value in the region is selected as the new value of the corresponding position after sampling. Through convolution and pooling processing of the relative features, the most significant features in each local region can be retained, the data amount is reduced, and the complexity of subsequent calculation is reduced. Meanwhile, the maximum pooling operation also has certain translation invariance, which helps to improve the robustness of the model. Through dimension reduction sampling, the network can gradually increase the receptive field while retaining key features, and capture structure features in a larger range of the sparse matrix.

[0102] In addition, in the process of converting the second feature map into a 256-dimensional relative feature vector, a corresponding linear layer can be introduced for expansion, and a ReLU (Rectified Linear Unit) activation function can be introduced after the linear layer to enhance the non-linear expression ability of the network, and the application does not limit this.

[0103] In step 104, the target sparse matrix is subjected to feature extraction to obtain absolute features corresponding to the target sparse matrix, and the absolute features are learned to obtain an absolute feature vector corresponding to the target sparse matrix.

[0104] The absolute features of the target sparse matrix can at least include the matrix dimension of the target sparse matrix, the block size of the pixel sub-block, the maximum matrix element, the minimum matrix element, the minimum pixel sub-block, and the maximum pixel sub-block. The absolute feature vector can be a 256-dimensional absolute feature vector. The matrix dimension, the block size, the maximum matrix element, the minimum matrix element, the minimum pixel sub-block, and the maximum pixel sub-block can be expanded into a 256-dimensional absolute feature vector.

[0105] In the process of expanding each dimension absolute feature into a 256-dimensional absolute feature vector, the absolute feature can be learned through two linear layers. In the process of expanding the absolute feature in each linear layer, the ReLU activation function can be used to enhance the feature expression ability.

[0106] In step 105, the relative feature vector and the absolute feature vector are input into a target iterative method selection model to output a target iterative method for the target sparse matrix.

[0107] When the relative feature vector and the absolute feature vector are obtained, the relative feature vector and the absolute feature vector can be spliced to obtain a fused feature vector (i.e., a 512-dimensional fused vector), and then the fused feature vector can be input into a target iterative method selection model to output a target iterative method for the target sparse matrix, so as to solve the sparse matrix through the target iterative method, thereby realizing comprehensive representation of the matrix through simultaneous processing of the relative feature and the absolute feature of the sparse matrix, and the selection of the iterative method based on the fused feature can significantly improve the accuracy of the selection of the iterative method, reduce the linear system solving time, and improve the calculation efficiency.

[0108] In some possible implementation manners, the linear layer for the target sparse feature can be determined, the linear layer at least including a first linear layer and a second linear layer, the second linear layer at least including a plurality of neurons, each neuron corresponding to a candidate iterative method, then the 256-dimensional relative feature vector and the 256-dimensional absolute feature vector are fused through the first linear layer to obtain a fused feature corresponding to the target sparse matrix, then the fused feature is input into the second linear layer for mapping to obtain a probability distribution for the neurons, and the candidate iterative method with the highest probability is selected from the candidate iterative methods as the target iterative method for the target sparse matrix according to the probability distribution, so as to solve the sparse matrix through the target iterative method, thereby realizing comprehensive representation of the matrix through simultaneous processing of the relative feature and the absolute feature of the sparse matrix, and the selection of the iterative method based on the fused feature can significantly improve the accuracy of the selection of the iterative method, reduce the linear system solving time, and improve the calculation efficiency.

[0109] In step 106, the target sparse matrix is solved according to the target iterative method to obtain a scene feature corresponding to the target scene.

[0110] When the target iterative method is selected, the target sparse matrix can be solved according to the target iterative method to obtain a scene feature corresponding to the target scene, thereby realizing comprehensive representation of the matrix through simultaneous processing of the relative feature and the absolute feature of the sparse matrix, and the selection of the iterative method based on the fused feature can significantly improve the accuracy of the selection of the iterative method, reduce the linear system solving time, and improve the calculation efficiency.

[0111] It should be noted that the embodiments of the present application include but are not limited to the above examples, and it can be understood that those skilled in the art can also set according to actual needs under the guidance of the idea of the embodiments of the present application, and the present application does not limit this.

[0112] In the embodiment of the present application, by acquiring scene data for representing a target scene in a target software system, and determining a target sparse matrix corresponding to the target scene according to the scene data, then converting the target sparse matrix into a plurality of pixel sub-blocks, on the one hand, the pixel sub-blocks are subjected to feature extraction to obtain relative features corresponding to the target sparse matrix, and the relative features are learned to obtain a relative feature vector corresponding to the target sparse matrix, on the other hand, the target sparse matrix is subjected to feature extraction to obtain absolute features corresponding to the target sparse matrix, and the absolute features are learned to obtain an absolute feature vector corresponding to the target sparse matrix, then the relative feature vector and the absolute feature vector are input into a target iterative method selection model to output a target iterative method for the target sparse matrix, and then the target sparse matrix is solved according to the target iterative method to obtain scene features corresponding to the target scene, by simultaneously processing the relative features and the absolute features of the sparse matrix, comprehensive representation of the matrix is realized, and selection of the iterative method based on the fused features can significantly improve the accuracy of the iterative method selection, reduce the linear system solving time, and improve the calculation efficiency.

[0113] In order for those skilled in the art to better understand the technical solutions in the embodiments of the present application, the following will be exemplarily described through corresponding examples:

[0114] In an example, in the process of selecting an iterative method for a target sparse matrix, a corresponding solving method selection system can be constructed, which at least can include a relative feature extraction module, a relative feature learning module, an absolute feature extraction module, an absolute feature learning module, a feature fusion module and a method selection module.

[0115] Among them, the relative feature extraction module is responsible for extracting the red channel and the green channel from the sparse matrix as the relative features; the relative feature learning module learns the extracted relative features through a convolutional neural network; the absolute feature extraction module extracts corresponding numerical parameters from the sparse matrix as the absolute features; the absolute feature learning module learns the extracted absolute features through linear transformation and activation function; the feature fusion module fuses the learned relative features and absolute features; and the method selection module selects the optimal iterative solving method based on the fused features.

[0116] Correspondingly, in the process of processing the target sparse matrix, the corresponding processing procedure can be:

[0117] (1) Matrix preprocessing:

[0118] The input sparse matrix A is divided into m x m sub-blocks according to the set image resolution, and each sub-block corresponds to a corresponding pixel point, laying a foundation for subsequent feature extraction.

[0119] For example, if the image resolution is set to 256x256, the input sparse matrix A will be divided into 256x256 sub-blocks. For a sparse matrix of size 10000x10000, each sub-block will contain approximately (10000 / 256)x(10000 / 256)≈39x39 matrix elements.

[0120] (2) Relative feature extraction:

[0121] The red channel is calculated to represent the relative magnitude of non-zero elements, as shown in the following equations 2.1, 2.2, 2.3, and 2.4:

[0122]

[0123] v(a) = a - min(A) + 1 (2.3)

[0124] δ = max(A) - min(A) (2.4)

[0125] The green channel is calculated to represent the distribution density of non-zero elements, as shown in the following equation 3:

[0126]

[0127] An m*m*2-dimensional image representation is generated for subsequent deep learning.

[0128] In addition, the blue channel can be calculated by the following equation 4:

[0129]

[0130] where A i,j represents the matrix sub-block, and the indices i, j ∈ {1,...,m} are used to identify a specific sub-block in the partitioned matrix. δ represents the range of matrix element values, and min(A) and max(A) represent the minimum and maximum values in the matrix, respectively. v(a) represents the biased matrix element value. NNZ ij represents the total number of non-zero elements in the sub-block A ij , while γ i,j represents their biased average value. N A represents the order of the matrix, while N min and N max represent the minimum and maximum matrix order in the dataset, respectively. The order of the sub-block can be approximately estimated by the formula N b ≈ N A / m.

[0131] (3) Relative feature learning:

[0132] ① The image representation is processed using a 3×3 convolution kernel, and 32 feature maps are output.

[0133] ② Apply 2×2 max pooling to downsample the 32 feature maps:

[0134] Specifically, the first convolutional layer outputs 32 feature maps, each with a size of m*m, for example, 256*256. For each feature map, a 2×2 max-pooling window is used for downsampling. The stride of the pooling operation is 2, meaning the window moves 2 units at a time. For each 2×2 region, the maximum value is selected as the new value at the corresponding position after sampling. The result of sampling is 32 dimensionality-reduced feature maps, each with a size halved from its original size, i.e., (m / 2)×(m / 2)(m / 2). Figure 3 (The value in the image is 128×128×32). This operation preserves the most salient features in each local region while reducing the amount of data and lowering the complexity of subsequent calculations. Max pooling also has a certain degree of translation invariance, which helps improve the robustness of the model. Through this downsampling method, the network can gradually increase its receptive field while preserving key features, thereby capturing a larger range of structural features of the matrix.

[0135] ③ Further processing using 3×3 convolution kernels outputs 64 feature maps;

[0136] ④ Apply 2×2 max pooling again:

[0137] Specifically, the processing is similar to the first max pooling, but the input data is different: the input is 64 feature maps output from the second convolutional layer, each feature map being 128×128 in size (assuming an initial resolution of 256×256); a 2×2 max pooling window is used with a stride of 2; for each 2×2 region, the maximum value is selected and retained; this operation is performed on all 64 feature maps simultaneously. After the second max convolution, the output is 64 feature maps, each feature map's size is halved again, becoming 64×64 (e.g., ...). Figure 3 (As shown). The second pooling further compresses the data dimensionality, extracting higher-level abstract features. Through the combination of two convolutions and two poolings, the network achieves layer-by-layer abstraction from pixel-level details to higher-level structural features, providing a more compact and information-rich representation for subsequent feature fusion and classification tasks.

[0138] ⑤ Flatten the result and convert it into a 256-dimensional feature vector through a linear layer;

[0139] ⑥ Introduce the ReLU activation function after the linear layer to enhance the nonlinear expressive power of the network.

[0140] (4) Absolute feature extraction: Extract the following 6 key numerical parameters:

[0141] matrix dimension N A ;

[0142] block size N b ;

[0143] minimum value of matrix elements min(A)

[0144] maximum value of matrix elements max(A)

[0145] minimum value of pixel sub-block min(y)

[0146] maximum value of pixel sub-block max(y)

[0147] (5) Absolute feature learning:

[0148] Expand 6-dimensional absolute feature into 256-dimensional feature vector through two linear layers;

[0149] Apply ReLU activation function after each linear layer to enhance feature expression ability.

[0150] (6) Feature fusion:

[0151] Concatenate 256-dimensional relative feature vector and 256-dimensional absolute feature vector to form 512-dimensional fusion feature vector.

[0152] (7) Iterative method selection:

[0153] Process fusion feature through two linear layers;

[0154] Introduce Dropout mechanism with probability value 0.5 in the first linear layer to effectively prevent model overfitting;

[0155] The second linear layer contains k neurons, and k represents the number of candidate iterative methods;

[0156] Calculate probability distribution of each candidate iterative method based on final feature vector;

[0157] Select the method with the highest probability as the optimal iterative method for solving the given linear system.

[0158] For example, referring to Figure 2 , a schematic diagram of feature extraction provided in the embodiment of the application is shown, while extracting the red channel, the key absolute values of min(A), max(A), min(y) and max(y) are retained; at the same time, while extracting the green channel, the block size N b Further, in order to reduce redundancy, in the embodiment of the application, the blue channel is removed, and the matrix dimension N Aand by extracting both relative image representation and corresponding absolute numerical value, a more accurate and unique feature representation of the matrix is achieved.

[0159] In addition, referring to Figure 3 , a flowchart of the iterative method selection provided in the embodiments of the present application is shown, which includes three main components, relative feature processing Figure 3 (a)), absolute feature processing Figure 3 (b)) and feature fusion and selection Figure 3 (c)). Among them, the process of relative feature processing can include:

[0160] Convert the n x n sparse matrix into a 256 x 256 image representation (only containing red and green channels);

[0161] Apply the first convolution operation to generate a 256 x 256 x 32 feature map using 32 convolution kernels;

[0162] Perform the first pooling operation to reduce the feature map size to 128 x 128 x 32;

[0163] Apply the second convolution operation to generate a 128 x 128 x 64 feature map using 64 convolution kernels;

[0164] Perform the second pooling operation to reduce the feature map size to 64 x 64 x 64;

[0165] Flatten the result and convert it into a 256-dimensional vector through linear transformation;

[0166] Apply the ReLU activation function for nonlinear transformation.

[0167] The process of absolute feature processing can include:

[0168] Extract 6 key numerical parameters: N A (matrix dimension), N b (block size), min(A) (matrix minimum value), max(A) (matrix maximum value), min(γ) (block average minimum value) and max(γ) (block average maximum value);

[0169] Expand these 6 parameters to 128-dimensional, and then to 256-dimensional feature vectors through linear layers;

[0170] Apply the ReLU activation function after each linear transformation.

[0171] The process of feature fusion and selection can include:

[0172] Concatenate (Cat) the 256-dimensional relative feature vector and the 256-dimensional absolute feature vector into a 512-dimensional vector;

[0173] The fused features are processed by two-layer linear transformation (512→128, 128→k) (k represents the number of candidate iterative methods);

[0174] The vector representing the probability distribution of each candidate method is outputted;

[0175] The method with the highest probability is selected as the optimal iterative method for solving the given linear system.

[0176] Through the above process, a comprehensive representation of the matrix is achieved by simultaneously processing relative features and absolute features. The relative features effectively capture the spatial patterns of the matrix through the convolutional neural network, while the absolute features retain the key numerical information of the matrix. This fusion approach can significantly improve the accuracy of iterative method selection, reduce the linear system solving time, and improve the computational efficiency.

[0177] In summary, by fusing the relative image representation and the absolute numerical features, a high-precision representation of the matrix is achieved, and a one-to-one mapping relationship between the matrix and the features is established, fundamentally eliminating the feature ambiguity between different matrices. In addition, the proposed representation method not only captures the subtle differences in the internal structure of the matrix, but also retains the numerical magnitude of the matrix elements and other core information, thereby constructing a more comprehensive and robust feature representation system, significantly improving the matrix discrimination and the information entropy of the feature representation. In the process of selecting the iterative method, it provides a more accurate basis for the selection of the method, significantly improves the accuracy of the iterative method selection, reduces the linear system solving time, and improves the computational efficiency.

[0178] It should be noted that, for the method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the order of the described actions, because according to the embodiments of the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present application.

[0179] Referring to Figure 4 , a structural block diagram of a processing device for sparse linear systems is shown, which can specifically include the following modules:

[0180] The data acquisition module 401 is configured to acquire scene data for representing a target scene in a target software system, and determine a target sparse matrix corresponding to the target scene according to the scene data;

[0181] The matrix conversion module 402 is configured to convert the target sparse matrix into a plurality of pixel sub-blocks;

[0182] The relative feature extraction module 403 is configured to perform feature extraction on the pixel sub-blocks, obtain relative features corresponding to the target sparse matrix, and learn the relative features to obtain a relative feature vector corresponding to the target sparse matrix.

[0183] The absolute feature extraction module 404 is configured to perform feature extraction on the target sparse matrix, obtain absolute features corresponding to the target sparse matrix, and learn the absolute features to obtain an absolute feature vector corresponding to the target sparse matrix.

[0184] The method selection module 405 is configured to input the relative feature vector and the absolute feature vector into a target iterative method selection model to output a target iterative method for the target sparse matrix.

[0185] The solving module 406 is configured to solve the target sparse matrix according to the target iterative method to obtain scene features corresponding to the target scene.

[0186] In some possible implementation manners, the target scene includes at least one of a structural analysis scene, a fluid dynamics calculation scene, an electric power system simulation scene, and an electronic design automation scene; and the scene data includes at least one or more of the following:

[0187] geometric data, material properties, boundary conditions, load data, and matrix elements matched with the structural analysis scene; mesh data, fluid properties, boundary conditions, state variables, matrix features, and auxiliary data matched with the fluid dynamics calculation scene; network topology, electrical parameters, operation data, matrix types, and correction amounts matched with the electric power system simulation scene; and circuit elements, connection relationships between the circuit elements, excitation signals, and matrix forms matched with the electronic design automation scene.

[0188] In some possible implementation manners, the matrix conversion module 402 is specifically configured to:

[0189] obtain an image resolution for the target sparse matrix;

[0190] convert the target sparse matrix into a corresponding target image;

[0191] divide the target image into a plurality of pixel sub-blocks according to the image resolution, each pixel sub-block corresponding to a pixel point in the target image.

[0192] In some possible implementation manners, the relative feature extraction module 403 is specifically configured to:

[0193] Obtaining RGB channel information corresponding to each of the pixel sub-blocks, the RGB channel information at least including red channel information and green channel information;

[0194] Calculating according to the red channel information to obtain a relative magnitude size of the target sparse matrix;

[0195] Calculating according to the green channel information to obtain a distribution density of the target sparse matrix;

[0196] Calculating using the relative magnitude size and the distribution density to generate an m*m*2-dimensional image representation corresponding to the target sparse matrix, taking the image representation as a relative feature corresponding to the target sparse matrix, and m and the image resolution correspond respectively.

[0197] In some possible implementation manners, the relative feature vector is a 256-dimensional relative feature vector, and the relative feature extraction module 403 is specifically configured to:

[0198] Obtaining a 3*3 convolution kernel for the relative feature;

[0199] Convolving the relative feature using the 3*3 convolution kernel to output 32 first feature maps;

[0200] Determining a sampling window for the first feature maps;

[0201] Pooling each of the first feature maps according to the sampling window to obtain a first target feature map corresponding to the first feature maps after dimension reduction;

[0202] Convolving the first target feature map using the 3*3 convolution kernel to output 64 second feature maps, and pooling each of the second feature maps according to the sampling window to obtain a second target feature map corresponding to the second feature maps after dimension reduction;

[0203] Converting the second target feature map into a 256-dimensional relative feature vector.

[0204] In some possible implementation manners, the absolute feature at least includes a matrix dimension of the target sparse matrix, a block size of the pixel sub-block, a maximum matrix element value, a minimum matrix element value, a minimum value of the pixel sub-block, and a maximum value of the pixel sub-block, the absolute feature vector is a 256-dimensional absolute feature vector, and the absolute feature extraction module 404 is specifically configured to:

[0205] Expanding the matrix dimension, the block size, the maximum matrix element value, the minimum matrix element value, the minimum value of the pixel sub-block, and the maximum value of the pixel sub-block into a 256-dimensional absolute feature vector.

[0206] In some possible implementation manners, the method selection module 405 is specifically configured to:

[0207] determine a linear layer for the target sparse feature, the linear layer at least including a first linear layer and a second linear layer, the second linear layer at least including a plurality of neurons, each of the neurons corresponding to a candidate iterative method;

[0208] fuse the 256-dimensional relative feature vector and the 256-dimensional absolute feature vector through the first linear layer to obtain a fused feature corresponding to the target sparse matrix;

[0209] input the fused feature into the second linear layer for mapping to obtain a probability distribution for the neurons, and select a candidate iterative method with the highest probability from the candidate iterative methods as a target iterative method for the target sparse matrix according to the probability distribution.

[0210] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts refer to the part of the method embodiment.

[0211] In addition, the embodiment of the present application further provides an electronic device, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, the computer program being executed by the processor to implement each process of the above-mentioned processing method embodiment for a sparse linear system and achieve the same technical effects. To avoid repetition, no further description is given here.

[0212] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, the computer program being executed by the processor to implement each process of the above-mentioned processing method embodiment for a sparse linear system and achieve the same technical effects. To avoid repetition, no further description is given here. The computer readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0213] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts of each embodiment can be referred to each other.

[0214] Those skilled in the art will appreciate that embodiments of the present application can be provided as methods, apparatus, or computer program products. Accordingly, embodiments of the present application can be embodied in the form of entire hardware embodiments, entire software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present application can be embodied in the form of computer program products embodied on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROMs, optical memory, EEPROM, Flash, eMMC, and the like) having computer usable program code embodied thereon.

[0215] Embodiments of the present application are described with reference to the flowchart illustrations and / or block diagrams of the methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device, or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams.

[0216] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams.

[0217] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams.

[0218] Although preferred embodiments of the present application have been described, those skilled in the art will appreciate that additional modifications and alterations can be made to the embodiments without departing from the scope of the present application. Accordingly, the appended claims are intended to encompass all such modifications and alterations as fall within the scope of the present application.

[0219] Finally, it is to be understood that the phraseology or terminology such as "first" and "second" etc. used herein is merely intended to differentiate one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the element.

[0220] The above describes in detail the processing method for a sparse linear system and the processing device for a sparse linear system provided by the present application. The principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the present application. In summary, the content of the present description should not be understood as a limitation of the present application.

Claims

1. A processing method for sparse linear systems, characterized in that, The method comprises: acquiring scene data for representing a target scene in a target software system, and determining a target sparse matrix corresponding to the target scene according to the scene data; transforming the target sparse matrix into a plurality of pixel sub-blocks; performing feature extraction on the pixel sub-blocks to obtain relative features corresponding to the target sparse matrix, and learning the relative features to obtain a relative feature vector corresponding to the target sparse matrix; performing feature extraction on the target sparse matrix to obtain absolute features corresponding to the target sparse matrix, and learning the absolute features to obtain an absolute feature vector corresponding to the target sparse matrix; inputting the relative feature vector and the absolute feature vector into a target iterative method selection model to output a target iterative method for the target sparse matrix; solving the target sparse matrix according to the target iterative method to obtain a scene feature corresponding to the target scene.

2. The method of claim 1, wherein, The target scene comprises at least one of a structural analysis scene, a fluid dynamics calculation scene, an electric power system simulation scene, and an electronic design automation scene; wherein the scene data comprises at least one or more of the following: geometric data, material properties, boundary conditions, load data, and matrix elements corresponding to the structural analysis scene; mesh data, fluid properties, boundary conditions, state variables, matrix characteristics, and auxiliary data corresponding to the fluid dynamics calculation scene; network topology, electrical parameters, operating data, matrix type, and correction amount corresponding to the electric power system simulation scene; circuit elements, connection relationships between the circuit elements, excitation signals, and matrix forms corresponding to the electronic design automation scene.

3. The method of claim 1, wherein, The transformation of the target sparse matrix into a plurality of pixel sub-blocks comprises: acquiring an image resolution for the target sparse matrix; transforming the target sparse matrix into a corresponding target image; dividing the target image into a plurality of pixel sub-blocks according to the image resolution, each pixel sub-block corresponding to a pixel point in the target image.

4. The method of claim 3, wherein, The feature extraction on the pixel sub-blocks to obtain relative features corresponding to the target sparse matrix comprises: acquiring RGB channel information corresponding to each pixel sub-block, the RGB channel information comprising at least red channel information and green channel information; calculating according to the red channel information to obtain a relative magnitude of the target sparse matrix; calculating according to the green channel information to obtain a distribution density of the target sparse matrix; calculating using the relative magnitude and the distribution density to generate an m*m*2-dimensional image representation corresponding to the target sparse matrix, taking the image representation as the relative features corresponding to the target sparse matrix, wherein m corresponds to the image resolution.

5. The method of claim 4, wherein, The relative feature vector is a 256-dimensional relative feature vector, and the learning of the relative features to obtain a relative feature vector corresponding to the target sparse matrix comprises: acquiring a 3*3 convolution kernel for the relative features; performing convolution processing on the relative features using the 3*3 convolution kernel to output 32 first feature maps; determining a sampling window for the first feature map; pooling each of the first feature maps according to the sampling window to obtain a first target feature map corresponding to the first feature map after dimension reduction; performing convolution on the first target feature map using the 3*3 convolution kernel to output 64 second feature maps, and performing pooling on each of the second feature maps according to the sampling window to obtain a second target feature map corresponding to the second feature map after dimension reduction; converting the second target feature map into a 256-dimensional relative feature vector.

6. The method of claim 5, wherein, The absolute feature at least includes the matrix dimension of the target sparse matrix, the block size of the pixel sub-block, the maximum matrix element, the minimum matrix element, the minimum value of the pixel sub-block and the maximum value of the pixel sub-block, the absolute feature vector is a 256-dimensional absolute feature vector, and the learning of the absolute feature to obtain the absolute feature vector corresponding to the target sparse matrix includes: The matrix dimension, the block size, the maximum matrix element, the minimum matrix element, the minimum value of the pixel sub-block and the maximum value of the pixel sub-block are expanded into a 256-dimensional absolute feature vector.

7. The method of claim 6, wherein, The relative feature vector and the absolute feature vector are input into a target iterative method selection model to output a target iterative method for the target sparse matrix. determining a linear layer for the target sparse feature, the linear layer at least including a first linear layer and a second linear layer, the second linear layer at least including a plurality of neurons, each of the neurons corresponding to a candidate iterative method; fusing the 256-dimensional relative feature vector and the 256-dimensional absolute feature vector through the first linear layer to obtain a fusion feature corresponding to the target sparse matrix; mapping the fusion feature into the second linear layer to obtain a probability distribution for the neurons, and selecting a candidate iterative method with the highest probability from the candidate iterative methods as the target iterative method for the target sparse matrix according to the probability distribution.

8. A processing device for sparse linear systems, characterized in that The method includes: a data acquisition module configured to acquire scene data for representing a target scene in a target software system, and determine a target sparse matrix corresponding to the target scene according to the scene data; a matrix conversion module configured to convert the target sparse matrix into a plurality of pixel sub-blocks; a relative feature extraction module configured to extract features of the pixel sub-blocks to obtain relative features corresponding to the target sparse matrix, and learn the relative features to obtain a relative feature vector corresponding to the target sparse matrix; an absolute feature extraction module configured to extract features of the target sparse matrix to obtain absolute features corresponding to the target sparse matrix, and learn the absolute features to obtain an absolute feature vector corresponding to the target sparse matrix; a method selection module configured to input the relative feature vector and the absolute feature vector into a target iterative method selection model to output a target iterative method for the target sparse matrix. A solving module is configured to solve the target sparse matrix according to the target iterative method, and obtain scene features corresponding to the target scene.

9. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is configured to store a computer program; The processor is configured to execute the program stored in the memory, and implement the method according to any one of claims 1-7. 10.A computer readable storage medium having stored thereon instructions that, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Fluid feature extraction method and system, computer readable storage medium and equipment

    CN111859785A

  • Feature detection method and device based on sparse matrix vector multiplication and medium

    CN116186526A