Adaptive allocation methods, devices, equipment, and storage media for computing resources

By dynamically adjusting the subdomain partitioning through adaptive partitioning and merging operations, the problem of insufficient computing resource allocation in existing technologies is solved, enabling efficient solutions in the absence of prior information and improving the solution accuracy and computational efficiency of singular perturbation problems.

CN122489290APending Publication Date: 2026-07-31SUZHOU INST FOR ADVANCED STUDY USTC +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU INST FOR ADVANCED STUDY USTC
Filing Date
2026-06-25
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

When solving problems with rapidly changing local characteristics, existing technologies struggle to automatically and adaptively allocate computing resources in the absence of prior information, making it difficult to balance solution accuracy and computational efficiency.

Method used

By obtaining the continuous domain of the problem to be solved, a stochastic characteristic function and a unit decomposition function are constructed to generate a local approximation function. Based on the first index field and the second index field, adaptive segmentation and merging operations are performed to dynamically adjust the subdomain partitioning and optimize the allocation of computing resources.

Benefits of technology

It significantly improves the ability to capture abrupt changes in the solution, increases the solution accuracy, reduces the computational load, is suitable for complex geometry and high-dimensional environments, and achieves a balance between computational overhead and solution accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489290A_ABST
    Figure CN122489290A_ABST
Patent Text Reader

Abstract

This application provides an adaptive allocation method, apparatus, device, and storage medium for computing resources, which can be applied to the field of computer resource management. The method includes: discretizing the continuous domain of the problem to be solved into multiple subdomains, and allocating a set of computational points to each subdomain; within each subdomain, constructing a random characteristic function using random characteristic parameters, and constructing a local approximation function for each subdomain based on the random characteristic function and the unit decomposition function, thereby transforming the problem to be solved into a solvable problem; obtaining a global approximate solution by solving the solvable problem, and calculating a first index field and a second index field based on the global approximate solution; performing a segmentation operation on the first subdomain and / or a merging operation on the second subdomain based on the first index field and the second index field; repeating the above steps until the subdomains after the segmentation and merging operations meet a preset termination condition, thereby obtaining the target subdomain partitioning result of the problem to be solved and the corresponding global approximate solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer resource management, specifically to an adaptive allocation method, apparatus, device, and storage medium for computing resources. Background Technology

[0002] Singular perturbation problems are widespread in fields such as fluid mechanics, elasticity, and quantum mechanics. Their core characteristic lies in the inclusion of a small parameter in the governing equations, causing the solution to change drastically within a narrow local region, forming a boundary layer or inner layer, while the change is relatively gradual in the broader surrounding regions. This highly non-uniform spatial distribution of solution accuracy requirements poses a significant challenge to the rational allocation of computational resources. That is, sufficient computational resources must be invested in singular regions to capture the abrupt changes in the solution, while avoiding wasting computational resources in flat regions. The key to efficiently solving this type of problem lies in how to adaptively allocate computational resources in the absence of prior information about the layer structure.

[0003] Traditional numerical methods typically rely on hierarchical adaptive meshes to capture abrupt changes in solutions, but this requires prior information about the layer structure and is difficult to extend to complex geometries or high-dimensional problems. While adaptive mesh refinement strategies alleviate this somewhat, they still struggle to robustly capture local features. Neural network-based solution methods, such as the Physical Information Neural Network (PINN), possess meshless characteristics and general approximation capabilities, but rely on nonlinear optimization, resulting in high computational costs and hyperparameter sensitivity. Stochastic feature methods simplify optimization to a linear least squares task, achieving high accuracy, but their fixed uniform domain decomposition strategy cannot adaptively adjust the subdomain partitioning, leading to insufficient computational resource allocation in singular regions and redundant waste of computational resources in smooth regions. Summary of the Invention

[0004] (a) Technical problems to be solved

[0005] In view of the above problems, this application provides an adaptive allocation method, apparatus, device and storage medium for computing resources, so as to at least partially solve the technical problem that the prior art is unable to automatically achieve adaptive allocation of computing resources in the absence of prior information when solving problems with local rapid changes, resulting in a difficulty in balancing solution accuracy and computing efficiency.

[0006] (II) Technical Solution

[0007] This application provides an adaptive allocation method for computing resources, applied to a computer system, comprising: acquiring a problem to be solved; discretizing the continuous domain of the problem to be solved into multiple subdomains and allocating a set of computing points to each subdomain; within each subdomain, constructing a random feature function using pre-generated random feature parameters, and constructing a local approximation function for each subdomain based on the random feature function and the unit decomposition function, so as to transform the problem to be solved into a solvable problem; obtaining a global approximate solution by solving the solvable problem; calculating a first index field characterizing the distribution of solution error within the domain and a second index field characterizing the degree of solution variation within each subdomain based on the global approximate solution; performing a segmentation operation on the first subdomain and / or a merging operation on the second subdomain based on the first index field and the second index field; wherein, the first subdomain is the subdomain whose solution accuracy indicated by the first index field does not meet the first precision condition, and the second subdomain is the adjacent subdomain whose second index field meets the similarity condition and whose merged solution accuracy meets the second precision condition; repeating the above steps until the subdomains after the segmentation and merging operations meet the preset termination condition, thereby obtaining the target subdomain partitioning result of the problem to be solved and the corresponding global approximate solution.

[0008] According to an embodiment of this application, performing a segmentation operation on a first subdomain includes: obtaining the degree of solution variation of the first subdomain in each spatial dimension of the domain based on a second index field; when the ratio of the degree of solution variation in at least one spatial dimension to the degree of solution variation in all other spatial dimensions exceeds a preset ratio threshold, splitting the first subdomain into at least two subdomains along each spatial dimension; when the ratio of the degree of solution variation in each spatial dimension to the degree of solution variation in all other spatial dimensions does not exceed the preset ratio threshold, uniformly splitting the first subdomain into a preset number of subdomains.

[0009] According to an embodiment of this application, performing a merging operation on the second subdomain includes: obtaining the magnitude change of the solution error of each subdomain based on a first index field, wherein the magnitude change is used to characterize the difference between the solution errors of each subdomain; performing a merging operation on the adjacent subdomains when the magnitude change exceeds a preset change threshold, and the second index fields of the adjacent subdomains meet the similarity condition and the merging solution accuracy meets the second accuracy condition; and performing a merging operation on the adjacent subdomains when the magnitude change does not exceed the preset change threshold and the second index fields of the adjacent subdomains meet the similarity condition.

[0010] According to an embodiment of this application, after performing a merging operation on adjacent subdomains, the method further includes: based on the merged subdomain partitioning, resolving the solvable problem to obtain a global approximate solution and calculating a first index field; when the solution accuracy indicated by the newly obtained first index field decreases by more than a preset range compared to before the merging, canceling the merging operation.

[0011] According to an embodiment of this application, the first index field is constructed based on the residual obtained by substituting the global approximate solution into the control equation and boundary conditions of the problem to be solved; the second index field is constructed based on the gradient magnitude of the global approximate solution in each subdomain.

[0012] According to an embodiment of this application, the method further includes: when the governing equation of the problem to be solved contains a target parameter, and the value of the target parameter is less than a preset parameter threshold, constructing a parameter sequence that changes sequentially to the value of the target parameter; for each parameter value in the parameter sequence other than the value of the target parameter, obtaining the corresponding target subdomain partitioning result based on the parameter value, and using the target subdomain partitioning result as the initial subdomain partitioning for the next parameter value in the parameter sequence; and obtaining a global approximate solution corresponding to the value of the target parameter based on the value of the target parameter and the corresponding initial subdomain partitioning.

[0013] According to an embodiment of this application, the problem to be solved is a singular perturbation problem. Based on the stochastic characteristic function and the unit decomposition function, local approximation functions for each subdomain are constructed to transform the problem to be solved into a solvable problem. This includes: combining the local approximation functions into a global approximation function using the unit decomposition function; substituting the global approximation function into the governing equations and boundary conditions of the singular perturbation problem, and calculating the deviations at the placement points within the domain to construct a weighted loss function, thereby transforming the singular perturbation problem into a solvable minimization loss function problem.

[0014] A second aspect of this application provides an adaptive allocation device for computing resources, comprising: an acquisition module for acquiring a problem to be solved, discretizing the continuous domain of the problem into multiple subdomains, and allocating a set of computing points to each subdomain; a transformation module for constructing a random feature function within each subdomain using pre-generated random feature parameters, and constructing a local approximation function for each subdomain based on the random feature function and the unit decomposition function, so as to transform the problem to be solved into a solvable problem; and a solution module for obtaining a global approximate solution by solving the solvable problem, and calculating a first index characterizing the distribution of solution error within the domain based on the global approximate solution. The system comprises a first index field and a second index field characterizing the degree of solution variation within each subdomain; an allocation module, configured to perform a segmentation operation on the first subdomain and / or a merging operation on the second subdomain based on the first index field and the second index field; wherein the first subdomain is the subdomain whose solution accuracy indicated by the first index field does not meet the first precision condition, and the second subdomain is the adjacent subdomain whose solution accuracy after merging meets the second precision condition and satisfies the similarity condition of the second index field; and an iteration module, configured to repeatedly execute the above steps until the subdomains after the segmentation and merging operations meet the preset termination condition, thereby obtaining the target subdomain partitioning result of the problem to be solved and the corresponding global approximate solution.

[0015] A third aspect of this application provides an electronic device, comprising: one or more processors; a storage device for storing one or more computer programs, and an adaptive allocation method for computing resources executed by the one or more processors when the one or more programs are executed.

[0016] A fourth aspect of this application also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause an adaptive allocation method of computing resources executed by the processor.

[0017] (III) Beneficial Effects

[0018] The adaptive allocation method, apparatus, device, and storage medium for computing resources provided in this application have at least the following technical effects:

[0019] 1. By using a dual-index-driven mechanism based on the first index field and the second index field, it can automatically detect and accurately locate local singular regions such as the boundary layer (i.e., the first subdomain). It performs segmentation operations on the accuracy bottleneck region to increase the density of local computation points, which significantly improves the ability to capture abrupt changes in the solution. Compared with the fixed uniform domain decomposition method, the solution accuracy is greatly improved.

[0020] 2. By automatically identifying and merging adjacent subdomains with similar difficulty in regions with gentle changes, redundant computing resources are released, avoiding unnecessary computational overhead caused by global uniform refinement. Under the premise of ensuring accuracy, the overall computational load can be minimized, achieving a balance between computational overhead and solution accuracy.

[0021] 3. The entire adaptive process does not require prior information about the location, thickness, or number of layers. It can automatically adapt to the scale changes of singular regions under different target parameters and is suitable for various scenarios such as complex geometry and high-dimensional environments.

[0022] 4. When the value of the target parameter is less than the preset parameter threshold, resulting in an extremely thin singular region, the target parameter is gradually approximated through a parameter continuation strategy, ensuring the reliability of the index field calculation and the effectiveness of adaptive decomposition under extreme conditions. Attached Figure Description

[0023] To gain a more complete understanding of this application and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, wherein:

[0024] Figure 1 The schematic diagram illustrates a flowchart of the adaptive allocation method for computing resources provided in an embodiment of this application;

[0025] Figure 2 The schematic diagram illustrates the basic principle flowchart of the random feature method in the embodiments of this application;

[0026] Figure 3 The diagram illustrates a comparison of the solution results of the random feature method under uniform region segmentation.

[0027] Figure 4 The solution results and error diagram of the random feature method under non-uniform region segmentation are schematically shown;

[0028] Figure 5 The diagram illustrates a comparison between the true solution, the PINN numerical solution, and the numerical solution of the method of this application when the target parameter ε=1e-3 is provided in the embodiments of this application.

[0029] Figure 6 The diagram illustrates the adaptive domain decomposition results obtained for different target parameter values.

[0030] Figure 7 This illustration schematically shows the first and second index fields obtained after executing the method of this application, as provided in an embodiment of this application.

[0031] Figure 8 This illustration schematically shows a diagram of dividing a domain into four subdomains in an embodiment of this application.

[0032] Figure 9 This illustration shows a schematic diagram of how each subdomain is further divided into four equal parts to obtain sixteen subdomains, as provided in an embodiment of this application.

[0033] Figure 10 This illustration shows a schematic diagram of performing the first merging operation according to an embodiment of this application;

[0034] Figure 11 This illustration shows a schematic diagram of further segmentation based on the residuals and gradients of each subdomain, provided by an embodiment of this application.

[0035] Figure 12 This illustration schematically shows a diagram illustrating the execution of a second merging operation according to an embodiment of this application;

[0036] Figure 13 This illustration shows a schematic diagram of further segmentation based on a first index field and a second index field for each subdomain, provided by an embodiment of this application.

[0037] Figure 14 The diagram illustrates the target subdomain partitioning results provided in an embodiment of this application.

[0038] Figure 15 This schematically illustrates a structural block diagram of an adaptive allocation device for computing resources provided according to an embodiment of this application;

[0039] Figure 16 The diagram schematically illustrates the hardware structure of an electronic device. Detailed Implementation

[0040] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0041] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0042] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0043] The accompanying drawings show some block diagrams and / or flowcharts. It should be understood that some blocks or combinations thereof in the block diagrams and / or flowcharts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when executed by the processor, these instructions can create means for implementing the functions / operations described in these block diagrams and / or flowcharts.

[0044] Therefore, the technology of this application can be implemented in hardware and / or software (including firmware, microcode, etc.). Additionally, the technology of this application can take the form of a computer program product stored on a computer-readable medium, which can be used by or in conjunction with an instruction execution system. In the context of this application, a computer-readable medium can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, a computer-readable medium can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, apparatuses, or propagation media. Specific examples of computer-readable media include: magnetic storage devices, such as magnetic tape or hard disk drives (HDDs); optical storage devices, such as optical discs (CD-ROMs); memory, such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0045] In related technologies, singular perturbation problems are a class of widely existing differential equation problems in mathematics, physics, and engineering. The governing equations of such problems contain a very small positive parameter. Furthermore, when ε→0, the highest-order derivative term of the equation disappears, resulting in a decrease in the order of the equation.

[0046] The typical mathematical model of the singular perturbation problem can be expressed as:

[0047]

[0048] Here, L is a differential operator of order less than n, and the number of boundary (or initial) conditions matches the order of the original equation. When ε=0, the degenerate equation... The order of the equation is lower than that of the original equation, so the degenerate problem cannot satisfy all the boundary conditions. This contradiction of "excessive boundary conditions" causes the solution to change drastically in a narrow region of the domain (usually near the boundary), which is called the boundary layer; for time-dependent problems, an initial layer or an interior layer (such as a shock layer) may also appear.

[0049] Classical numerical methods for solving singular perturbation problems include the finite difference method, the finite element method, and the spectral method. To capture abrupt changes in the solution, these methods typically rely on hierarchical adaptive meshes, thus providing parameter-consistent convergence for many problems. While these methods have achieved theoretical success, they depend on prior information about the layer structure, including its location and thickness, and extending them to problems with complex geometries, high-dimensional environments, or dynamically evolving layers remains very difficult. Adaptive mesh refinement strategies alleviate this limitation to some extent, but often involve complex mesh management and may still face challenges in robustly capturing abrupt local anisotropy characteristics, making it difficult to achieve automatic optimal allocation of computational resources.

[0050] In recent years, with advancements in computing power and algorithm efficiency, artificial intelligence technology has developed rapidly. Neural networks, in particular, have attracted widespread attention in the field of partial differential equation (PDE) solving due to their meshless nature and universal approximation capabilities. However, original methods cannot effectively handle singular perturbation problems. Improvements include hybrid strategies combining matched asymptotic expansions and adaptive sampling methods; however, these methods rely on nonlinear optimization, resulting in high computational costs, hyperparameter sensitivity, and low computational resource utilization efficiency under strong multi-scale features. Another class of methods employs shallow neural networks with fixed hidden layer parameters, simplifying the optimization problem into a simple least-squares task involving only the output layer parameters, thus achieving higher accuracy on various PDEs compared to traditional neural network methods. Some studies have extended this framework to boundary layer problems with satisfactory results. For example, kernel-adaptive physical information limit learning machines optimize the distribution of the radial basis function center and width, enabling targeted kernel refinement in regions with drastic gradient changes, and employing soft partitioning of the domain improves stability and efficiency under engineering boundary layer conditions.

[0051] Domain decomposition strategies have been integrated into these methods to improve performance. A representative method is the random feature method (RFM), which uses a random feature function combined with a domain partition as an approximation function to evaluate the equations and boundary conditions (i.e., boundary / initial conditions) at the placement points and solve the linear least squares system to obtain an approximate solution. However, this method employs a fixed uniform domain decomposition strategy and cannot adaptively adjust the subdomain partition based on the local characteristics of the solution. This leads to insufficient allocation of computational resources in singular regions and redundant waste of computational resources in smooth regions, resulting in suboptimal performance or even failure on boundary layer problems. Furthermore, the location, thickness, and number of boundary layers in practice often depend on unknown solution characteristics or problem parameters, further exacerbating the difficulty of rationally allocating computational resources.

[0052] In view of this, embodiments of this application provide an adaptive allocation method for computing resources. This method can be applied to computer systems to at least partially solve the technical problem that, in solving problems with rapidly changing local characteristics, it is difficult to automatically achieve adaptive allocation of computing resources without prior information, resulting in a difficulty in balancing solution accuracy and computational efficiency.

[0053] like Figure 1 As shown, the flowchart of the adaptive allocation method for computing resources includes S1 to S5.

[0054] In operation S1, the problem to be solved is obtained, the continuous domain of the problem to be solved is discretized into multiple subdomains, and a set of computation points is assigned to each subdomain.

[0055] For example, the problem to be solved can be a differential equation problem with local rapid changes, such as a singular perturbation problem, a convection-diffusion problem, or a reaction-diffusion problem.

[0056] Once the problem to be solved is determined, its governing equations and boundary conditions can be obtained. The governing equations are the differential equations describing the problem to be solved, and the boundary conditions include boundary conditions or initial conditions, which are used to constrain the values ​​of the solutions of the governing equations at the boundaries of the domain or at the initial time to ensure the well-posedness of the solutions.

[0057] The continuous domain Ω of the problem to be solved is the spatial region defined by the governing equations and boundary conditions. During initial discretization, the continuous domain can be discretized into multiple subdomains using a uniform partitioning method, and the initial set of computational points for each subdomain can be generated by uniform sampling based on the subdomain range.

[0058] In operation S2, within each subdomain, a random characteristic function is constructed using pre-generated random characteristic parameters, and a local approximation function for each subdomain is constructed based on the random characteristic function and the unit decomposition function, so as to transform the problem to be solved into a solvable problem.

[0059] The random feature parameters, including weight parameters and bias parameters, are randomly generated within a preset interval and remain fixed. By activating these random feature parameters using a nonlinear activation function, a set of random feature functions corresponding to each subdomain can be constructed. The nonlinear activation function can be a hyperbolic tangent function or a trigonometric function. Simultaneously, normalized coordinates are defined within each subdomain, mapping the subdomain to a standard interval, and a unit decomposition function is constructed based on the subdomain center. The unit decomposition function can be discontinuous or continuous-differentiable. For high-dimensional cases, the unit decomposition function can be directly constructed from the one-dimensional unit decomposition functions of each dimension through tensor products. The local approximation function of each subdomain can be jointly constructed from the corresponding random feature function and the unit decomposition function. The random feature function provides local approximation capability within the subdomain, while the unit decomposition function limits the scope of the subdomain and achieves a smooth transition at the subdomain boundary.

[0060] By constructing local approximation functions within each subdomain, the governing equations and boundary conditions of the problem to be solved are transformed into a solvable problem. This solvable problem can be a problem of minimizing a loss function, where the loss function can be constructed based on the deviations obtained by substituting the governing equations and boundary conditions at each placement point within the domain using the global approximation function.

[0061] For example, to incorporate local variations of the solution within a smaller subdomain, RFM can generate a large number of local solutions. Each solution corresponds to a set of randomly selected eigenfunctions, which can then be combined using a unity decomposition function (PoU). Specifically, one can... Divide evenly into M pEach block contains points; select points from each block. And define normalized coordinates:

[0062] .

[0063] Where, r n Determined by the size of the blocks, x n The center of the block. The n-th block Mapped to Therefore, it is possible to construct with x n The PoU function is centered on this dimension. For each dimension, two commonly used PoU function types are...

[0064] ,

[0065] It is an indicator function. The function is discontinuous, and In high dimensions, the PoU function can be directly obtained from the tensor product. Then, for the nth block, it is constructed by the following function. random characteristic functions

[0066] ,

[0067] Among them, nonlinear activation function You can choose hyperbolic tangent or trigonometric functions. and Each element is from the interval The selection is uniform and remains unchanged.

[0068] In operation S3, a global approximate solution is obtained by solving the solvable problem. Based on the global approximate solution, a first index field characterizing the distribution of solution error within the defined domain and a second index field characterizing the degree of solution variation within each subdomain are calculated.

[0069] After constructing the local approximation functions for each subdomain, these functions can be combined to form a global approximation solution over the entire domain. Then, the expression of the global approximation solution can be substituted into the governing equations and boundary conditions of the problem to be solved, and discretized at points within the domain (such as sets of computation points or boundary points within each subdomain). This yields a system of linear equations or a least-squares problem with undetermined coefficients. By solving this linear system (e.g., using the least squares method, pseudo-inverse method, or iterative solver), the linear combination coefficients of the stochastic characteristic functions within each subdomain can be determined, thus obtaining an explicit global approximation solution expression.

[0070] In some exemplary embodiments, the first index field is constructed based on the residual obtained by substituting the global approximate solution into the governing equations and boundary conditions of the problem to be solved; the second index field is constructed based on the gradient magnitude of the global approximate solution in each subdomain.

[0071] Substituting the global approximate solution into the governing equations (such as partial differential equations) and boundary conditions of the original problem, we can calculate the equation residuals and boundary residuals. The residuals reflect the degree to which the global approximate solution satisfies the governing equations and boundary conditions at each configuration point. Regions with large errors indicate that the current subdomain partitioning is insufficient to capture the solution variation characteristics of that region. Thus, we can obtain the first index field reflecting the spatial distribution of solution accuracy.

[0072] The gradient magnitude of the global approximate solution is calculated in each subdomain. The gradient magnitude reflects the degree of change of the solution in that region. Regions with larger gradient magnitudes indicate that the solution changes drastically in that region, requiring finer subdomain partitioning to accurately capture the behavior of the solution; regions with smaller gradient magnitudes indicate that the solution changes gradually, and computational resources can be appropriately reduced.

[0073] Understandably, by jointly calculating the first and second index fields, the rationality of the current subdomain partitioning and the efficiency of computational resource allocation can be comprehensively evaluated from two dimensions: solution error and the degree of solution change. This provides a basis for subsequent adaptive partitioning and merging operations.

[0074] In operation S4, a segmentation operation is performed on the first subdomain and / or a merging operation is performed on the second subdomain based on the first index field and the second index field; wherein, the first subdomain is the subdomain whose solution accuracy indicated by the first index field does not meet the first accuracy condition, and the second subdomain is the adjacent subdomain whose second index field meets the similarity condition and whose solution accuracy after merging meets the second accuracy condition.

[0075] Based on the first index field (solution error distribution field), regions with insufficient solution accuracy in the current global approximation solution can be identified. For subdomains in the first index field where the residual exceeds a preset first accuracy threshold, they can be marked as the first subdomain, and a segmentation operation can be performed. The segmentation operation can subdivide the first subdomain into multiple smaller subdomains (such as bisection or quartering), and redistribute the set of computation points in the newly generated subdomains to increase the local approximation capability of the region, thereby improving the solution accuracy.

[0076] Based on the second index field (the distribution field of solution variation), regions with gradual solution variation can be identified. For adjacent subdomains, if their second index fields satisfy preset similarity conditions (such as similar mean or distribution of gradient magnitudes), and the new global approximate solution obtained after merging these adjacent subdomains still satisfies the second accuracy condition (i.e., the accuracy of the merged solution is not lower than the preset requirement), then these adjacent subdomains can be marked as the second subdomain, and a merging operation can be performed. The merging operation can integrate multiple adjacent subdomains into a larger subdomain, reducing unnecessary computation points and thus saving computational resources.

[0077] Through the aforementioned adaptive adjustment strategy of segmentation and merging, computing resources can be dynamically allocated to the regions that require the most precise solutions (such as boundary layers, shock waves, and other locally rapidly changing regions), while avoiding computational waste in regions where the solution changes gradually, thereby achieving optimal allocation of computing resources.

[0078] In operation S5, the above steps are repeated until the subdomains after the partitioning and merging operations meet the preset termination conditions, and the target subdomain partitioning result and the corresponding global approximate solution of the problem to be solved are obtained.

[0079] Repeat operations S2 to S4, that is, after each round of subdomain adjustment, reconstruct local approximate functions in each subdomain, combine them to form a new global approximate solution, calculate the first index field and the second index field, and perform the partitioning and merging operations. The above iterative process continues until the current subdomain partitioning meets the preset termination condition.

[0080] The preset termination conditions may include one or more of the following: the maximum residual of the global approximate solution is less than the preset error tolerance; the subdomain partitioning no longer changes significantly in multiple consecutive iterations (i.e., neither the splitting nor merging operations are triggered); the total number of subdomains reaches the preset upper or lower limit; or the preset maximum number of iterations is reached. When the termination conditions are met, the iteration stops, the current subdomain partitioning result is output as the target subdomain partitioning, and the corresponding global approximate solution is output as the final approximate solution to the problem to be solved.

[0081] Figure 2 The schematic diagram illustrates the basic principle flowchart of the random feature method in the embodiments of this application.

[0082] like Figure 2 As shown, the stochastic feature method is a computational approach that combines traditional numerical methods with deep learning concepts. Based on stochastic feature functions and the least squares algorithm, it possesses spectral accuracy. In this method, a set of stochastic feature functions can first be generated. With the set of unity decomposition functions The random feature function provides local approximation capability, while the unity decomposition function limits the scope of each subdomain and achieves smooth transitions at subdomain boundaries. Simultaneously, collocation point sampling is performed within the domain and on its boundaries to obtain a set of collocation points. C I For configuration points within a domain, C B Set points for the boundary. Then, substitute the global approximation function into the governing equations and boundary conditions of the problem to be solved, and apply the strong form of the equations at the set points, i.e., set points C internally. I Apply governing equations to the boundary and place point C. B Boundary conditions are applied. Based on the discretized equations described above, a linear least squares system Au=b can be constructed, and the undetermined coefficient vector u can be obtained. Finally, the obtained coefficients are substituted into the approximate solution expression to return the numerical solution. Where M is the number of random characteristic functions, These are coefficients to be determined.

[0083] Traditional random feature methods employ a uniform segmentation strategy, which suffers from unreasonable allocation of computational resources for problems with locally rapidly changing features such as boundary layers. The embodiments of this application... Figure 2 Based on the basic process shown, an adaptive region decomposition strategy (such as...) is introduced. Figure 1 Operations S1 to S5 (shown) achieve dynamic optimization of computational resource allocation through an adaptive subdomain partitioning and merging mechanism based on the solution error distribution and the solution change degree distribution. This makes it more suitable for solving complex problems with local multi-scale characteristics, such as singular perturbation problems, while improving computational efficiency and solution accuracy.

[0084] In the embodiments of this application, the problem to be solved is a singular perturbation problem; based on the stochastic characteristic function and the unit decomposition function, local approximation functions for each subdomain are constructed to transform the problem to be solved into a solvable problem, including: combining the local approximation functions into a global approximation function using the unit decomposition function; substituting the global approximation function into the governing equations and boundary conditions of the singular perturbation problem, and calculating the deviations at the placement points within the domain to construct a weighted loss function, thereby transforming the singular perturbation problem into a solvable minimization loss function problem.

[0085] Because the stochastic feature method uses a strong-form discretization approach, it eliminates the need to construct weak-form or variational forms. Therefore, the loss function can be constructed simply by calculating the governing equations (partial differential equations) or boundary conditions at the placement points. Specifically, the stochastic feature method involves two sets of placement points, namely, the set C representing the placement points within the domain. I And the set of configuration points C representing boundary points B .set up Let K represent the set of all configuration points. At each configuration point, the stochastic feature method enforces the corresponding governing equations or boundary conditions. I and K B Let these represent the number of governing equations and boundary conditions, respectively. Then the total number of conditions is determined by... Provided.

[0086] After constructing the global approximation function, it can be substituted into the governing equations and boundary conditions of the singular perturbation problem, and the deviation can be calculated at each placement point to construct the weighted loss function. For example, the weighted loss function can be defined as:

[0087] ,

[0088] in, and The penalty parameter can be automatically and adaptively adjusted for each configuration point. Under this weighted loss function, the stochastic feature method can use different penalty parameters at different configuration points, thus dynamically adjusting the constraint strength based on the local solution difficulty. For regions with drastic solution changes near the boundary layer in singular perturbation problems, a larger penalty weight can be assigned to force the approximate solution to more accurately satisfy the governing equations; for regions with gradual solution changes, a smaller penalty weight can be assigned to avoid over-constraint. By minimizing the above weighted loss function, the solution to the singular perturbation problem can be transformed into a linear least squares optimization problem, which can be solved using the standard least squares approximation algorithm.

[0089] Understandably, for singular perturbation problems, introducing a weighted loss function and using adaptive penalty parameters at different configuration points can effectively capture local abrupt changes such as boundary layers, thereby improving solution accuracy.

[0090] Based on the above method, this application provides an adaptive allocation method for computing resources, which is essentially an adaptive domain decomposition stochastic feature method. This method replaces the uniform segmentation of traditional stochastic feature methods with an adaptive domain decomposition strategy, achieving automatic detection of singular regions and targeted allocation of computing resources. When solving singular perturbation partial differential equations, this method achieves higher accuracy than stochastic feature methods under uniform domain decomposition, physical information neural networks, and layer-adaptive grid methods.

[0091] The principle and effect of the adaptive segmentation algorithm are explained below with specific examples. In singular perturbation problems, if the random feature method under uniform segmentation is directly applied for solving, the boundary layer cannot be detected when the number of subdomains is small, thus affecting the solution effect. Take the following singular perturbation problem as an example:

[0092]

[0093] The true solution to this problem is ,in . It is a very small positive parameter (target parameter), that is, it satisfies The problem is... There is a boundary layer at that location, with a width of .

[0094] Figure 3 The diagram illustrates a comparison of the solution results of the random feature method under uniform region segmentation.

[0095] The left figure shows the number of subfields. The result at that time, L 2 The error is 4.96e-1; the right figure shows the number of subdomains. The result at that time, L 2 The error is 6.33e-4. It is evident that under uniform partitioning, a good solution can only be obtained when the number of subdomains reaches 8.

[0096] Figure 4 The diagram illustrates the solution results and error profile of the random feature method under non-uniform region segmentation.

[0097] like Figure 4 As shown, when the domain [0,1] is non-uniformly divided into two subdomains [0,0.0625] and [0.0625,1], while keeping other settings unchanged, L 2 The error reached the order of e⁻⁷, and the solution accuracy far exceeded that of the uniformly segmented stochastic feature method under the condition of using a smaller number of subdomains. However, in practical problems, it is usually impossible to obtain the specific location and width of the boundary layer in advance. Therefore, it is necessary to develop an adaptive domain decomposition strategy to automatically detect singular regions and perform targeted subdomain refinement.

[0098] The adaptive domain decomposition in this application mainly includes two core operations: segmentation and merging. The segmentation operation is based on the observation that a large solution error or drastic solution variation within a subdomain indicates the presence of local characteristics in the solution, making accurate approximation impossible under the current subdomain partitioning. Therefore, the subdomain needs to be refined to increase local approximation capability. The merging operation is based on the observation that for two adjacent subdomains, if their solutions exhibit comparable variation and consistently small solution errors, a unified approximation function is sufficient to describe these two subdomains, allowing them to be merged to free up redundant computational resources. Through alternating iterations of segmentation and merging, an automatic skewed allocation of computational resources to singular regions is achieved.

[0099] Based on the above embodiments, in this embodiment, the segmentation operation on the first subdomain includes: obtaining the degree of solution change of the first subdomain in each spatial dimension of the domain based on the second index field; when the ratio of the degree of solution change in at least one spatial dimension to the degree of solution change in all other spatial dimensions exceeds a preset ratio threshold, splitting the first subdomain into at least two subdomains along each spatial dimension; when the ratio of the degree of solution change in each spatial dimension to the degree of solution change in all other spatial dimensions does not exceed the preset ratio threshold, uniformly splitting the first subdomain into a preset number of subdomains.

[0100] To identify the first subdomain requiring segmentation, a first index field can be used. When the domain is sufficiently divided, the subdomain containing locally rapidly changing features such as the boundary layer will have a significantly larger average residual than the subdomain without the boundary layer. Based on this pattern, the average residuals of each subdomain can be sorted to identify locations where the residual values ​​jump dramatically. The subdomain with the significantly higher residual than other subdomains is then designated as the first subdomain, while the remaining subdomains remain unchanged. The subdomain identified as the first subdomain can then undergo segmentation to increase the density of local computational points in that region and improve local approximation accuracy.

[0101] For example, the average residuals of each subdomain can be sorted by numerical value, and the lower quartile of the largest jump position can be used as the splitting threshold. Subdomains with average residuals exceeding this splitting threshold are identified as the first subdomain and split. This splitting threshold can also be used as a key parameter in subsequent merging processes.

[0102] After determining the first subdomain that needs to be segmented, we can further determine how to divide this subdomain. In this embodiment, the gradient (i.e., the second index field) in the subdomain is used as the index for the division direction. Specifically, if the degree of change of the solution in one spatial dimension (such as the gradient magnitude) is significantly greater than the degree of change of the solution in other spatial dimensions, that is, the ratio of the degree of change of the solution in this dimension to the degree of change of the solution in the other dimensions exceeds a preset ratio threshold, it indicates that the solution changes more drastically in this dimension. In this case, the first subdomain can be split into at least two subdomains along this dimension (such as splitting it in half along this direction). If the degree of change of the solution in two spatial dimensions is large (that is, the ratio of the degree of change of the solution in these two dimensions to the other dimensions exceeds a preset ratio threshold), it indicates that the solution changes significantly in these two dimensions. In this case, the first subdomain can be split into at least four subdomains along these two dimensions (such as splitting it in half along each of these two directions, for a total of four subdomains). When the ratio of the degree of change of the solution in each spatial dimension to the degree of change of the solution in the other spatial dimensions does not exceed the preset ratio threshold, it indicates that the degree of change of the solution in each dimension is comparable. At this time, the first subdomain is evenly divided into a preset number of subdomains (e.g., in the case of three dimensions, it is divided into two along each of the three directions, for a total of eight subdomains).

[0103] It is understandable that by using the above-mentioned adaptive partitioning strategy based on the anisotropy of the degree of solution change, the optimal partitioning method can be dynamically selected according to the variation characteristics of the solution in the local region, thereby improving the solution accuracy while avoiding unnecessary computational waste.

[0104] Based on the above embodiments, in this embodiment, the merging operation on the second subdomain includes: obtaining the magnitude change of the solution error of each subdomain based on the first index field, wherein the magnitude change is used to characterize the difference between the solution errors of each subdomain; when the magnitude change exceeds a preset change threshold, and the second index fields of adjacent subdomains meet the similarity condition and the merging solution accuracy meets the second accuracy condition, the merging operation is performed on the adjacent subdomains; when the magnitude change does not exceed the preset change threshold, and the second index fields of adjacent subdomains meet the similarity condition, the merging operation is performed on the adjacent subdomains.

[0105] After the partitioning operation is completed, a merging operation can be performed on the current subdomain partition. The merging operation can comprehensively consider the magnitude variation of the solution error, the gradient similarity between adjacent subdomains, and the solution accuracy after merging.

[0106] Specifically, when the average residuals of each subdomain differ by several orders of magnitude, meaning the magnitude of the variation exceeds a preset threshold, it indicates that the distribution of solution errors among the subdomains is extremely uneven, and the location of singular regions is relatively clear. In this case, a stricter first merging strategy can be adopted, that is, merging operations are only performed on adjacent subdomains when the second index fields of adjacent subdomains meet the similarity condition (i.e., similar gradient magnitudes) and the solution accuracy after merging meets the second accuracy condition (i.e., the residuals after merging remain below a specified threshold). When the average residuals of each subdomain are relatively uniform, meaning the magnitude of the variation does not exceed a preset threshold, it indicates that the distribution of solution errors among the subdomains is relatively uniform, and it is difficult to accurately identify the location of singular regions based solely on the residuals. In this case, the first index field has limited guiding role in the merging operation, and the residual factor can be directly ignored. In this situation, a more lenient second merging strategy can be adopted, that is, the merging decision is mainly based on the second index field. As long as the second index fields of adjacent subdomains meet the similarity condition (i.e., similar gradient magnitudes), it indicates that the approximation difficulty of these regions is comparable, and merging operations can be performed on the adjacent subdomains. This strategy improves computational efficiency by timely merging of unnecessary subdivisions, thus avoiding over-division of regions.

[0107] In summary, the overall merging process can be summarized as follows: First, the current domain decomposition is recorded as the optimal decomposition. Based on the degree of change in the average residual magnitude, an appropriate merging strategy (i.e., the first merging strategy or the second merging strategy) is selected to obtain a new merged decomposition. Next, a first-order partial differential equation can be solved on the updated decomposition using the stochastic characteristic method to calculate the corresponding average residual and gradient, which are used to evaluate the merging effect and guide subsequent iterations.

[0108] It is understandable that by adaptively selecting the merging strategy based on the degree of change in the average residual magnitude, and verifying the solution accuracy after merging, it is possible to maximize the merging of similar adjacent subdomains while ensuring solution accuracy, thereby reducing unnecessary subdomain partitioning and improving computational efficiency.

[0109] Based on the above embodiments, in this embodiment, after performing a merging operation on adjacent subdomains, the method further includes: resolving the solvable problem based on the merged subdomain partitioning to obtain a global approximate solution and calculating a first index field; when the solution accuracy indicated by the newly obtained first index field decreases by more than a preset range compared to before the merging, the merging operation is canceled.

[0110] Merging operations are not a one-time confirmation, but can be verified. If a merging operation results in a significant decrease in solution accuracy, the merging request can be rejected, thus ensuring the reliability of the final solution.

[0111] First, based on the merged subdomain partitioning, the solvable problem can be resolved to obtain a new global approximate solution, and the first index field (solution error distribution field) can be recalculated. The re-obtained solution accuracy is compared with the solution accuracy before merging. If the numerical accuracy after merging does not decrease significantly (i.e., the decrease does not exceed a preset range), and the number of subdomains after merging is less than the number of subdomains in the current optimal decomposition, the merged decomposition can be accepted as the new optimal decomposition. Conversely, if merging causes an excessive decrease in solution accuracy (i.e., the decrease exceeds a preset range), the merging operation can be rejected, the merging can be canceled, and the current optimal decomposition can be reverted. If the accuracy decrease is in an intermediate state (i.e., there is a certain degree of decrease but it does not exceed a preset range), a new set of random characteristic functions can be generated, and the solution can be recalculated to alleviate the local optimum problem.

[0112] Based on the above segmentation and merging operations, the overall adaptive domain decomposition process of this application embodiment is as follows. First, after the initial domain decomposition, several rounds of uniform refinement are performed to ensure that the approximate solution obtained on the refined partition is reliable. This reliability can be evaluated by the minimum residual between each subdomain. After obtaining a reliable reference solution, a merging operation is performed on the subdomains that can be easily approximated to reduce the number of subdomains involved in subsequent calculations, thereby reducing the overall computational overhead. Then, subdomains that need further refinement can be identified. At this stage, if the magnitude of the solution error between each subdomain is relatively small, indicating that the location of the singular region is difficult to determine, all subdomains are refined; otherwise, subdomains containing singularities are identified based on the first index field and the second index field, and segmentation operations are performed only on these subdomains. After refinement is completed, the first index field and the second index field are recalculated based on the updated subdomain partition, and the merging operation is applied again. The above alternating iterative process of segmentation and merging continues until a preset termination condition is met.

[0113] Understandably, the alternating iterative mechanism of adaptive refinement and subdomain merging achieves efficient allocation of computing resources near local singular regions. Specifically, in singular regions where the solution changes drastically, the density of computing points is increased through partitioning operations to improve local approximation accuracy; in regions where the solution changes gently, redundant computing resources are released through merging operations to reduce overall computing overhead, ultimately achieving a balance between solution accuracy and computational efficiency.

[0114] In embodiments of this application, the method further includes: when the governing equation of the problem to be solved contains a target parameter, and the value of the target parameter is less than a preset parameter threshold, constructing a parameter sequence that changes sequentially to the value of the target parameter; for each parameter value in the parameter sequence other than the value of the target parameter, obtaining the corresponding target subdomain partitioning result based on the parameter value, and using the target subdomain partitioning result as the initial subdomain partitioning for the next parameter value in the parameter sequence; and obtaining a global approximate solution corresponding to the value of the target parameter based on the value of the target parameter and the corresponding initial subdomain partitioning.

[0115] For singular perturbation problems with very small target parameters, directly applying the aforementioned adaptive algorithm is often difficult. This is because when the target parameter is extremely small, the width of the singular region (such as the boundary layer) is very narrow relative to the entire domain. Accurately calculating the first and second index fields within such a narrow region through numerical integration becomes extremely challenging, and in some cases, even impossible. This makes it unreliable to directly use the first and second index fields as the basis for segmentation and merging.

[0116] To address the aforementioned issues, a continuation strategy regarding the perturbation parameters can be employed. Specifically, when the governing equations of the problem to be solved contain objective parameters, and the values ​​of these objective parameters are less than a preset parameter threshold, a parameter sequence that sequentially changes to the values ​​of the objective parameters can be constructed. , where ε is the value of the objective parameter. Since the parameter is continuous... and The differences between them are relatively small, and the scale of the singular region gradually changes with the parameter value, so that the numerical integration remains reliable under each parameter value. The above adaptive algorithm can be applied normally at each stage.

[0117] During implementation, for each parameter value in the parameter sequence other than the target parameter, an adaptive allocation method is executed using that parameter value as the current parameter. This yields the target subdomain partitioning result corresponding to that parameter value, and the target subdomain partitioning result is used as the initial subdomain partitioning for the next parameter value in the parameter sequence. For example, for parameter... The convergent domain decomposition is obtained by solving for the solution, and it is used as the solution. Initial decomposition of the problem. By passing the information sequentially from front to back, a global approximate solution corresponding to the values ​​of the objective parameters can be obtained based on the values ​​of the objective parameters and the corresponding initial subdomain partitioning.

[0118] Understandably, by using the parameter continuation strategy, even when the target parameter is very small, reliable subdomain partitioning and accurate global approximate solutions can still be obtained.

[0119] Example 1:

[0120] Consider the following unique perturbation problem:

[0121] ,

[0122] The true solution to this problem is ,in ε is the objective parameter. This problem has a boundary layer at x=0 with a width of O(ε).

[0123] In this embodiment, the adaptive allocation method for computing resources provided in this application is compared with the performance of the Physical Information Neural Network (PINN) and layer-adaptive grid methods (including Shishkin grids and Bakhvalov grids). PINN employs a fully connected feedforward neural network with three hidden layers, each containing 50 neurons, and all hidden layers use activation functions. Training employed the Adam optimizer with an initial learning rate of 0.001, decaying by a factor of 0.9 every 10,000 training epochs. The penalty parameter λ in the loss function was 100, and the total training epochs were 50,000. This method utilizes 200 random feature functions and 100 placement points in each subdomain. Accuracy was compared among the methods under the same degrees of freedom.

[0124] Table 1 and Figure 5 This paper summarizes the final domain decomposition results of each method and the corresponding L... 2 Error and Error. Table 1 summarizes the solution results of the proposed method (ADD-RFM), Physical Information Neural Network (PINN), and layered adaptive grid methods (including Shishkin grids and Bakhvalov grids) under different target parameter ε values, with the same degrees of freedom. The "final DD" column represents the final target subdomain partitioning obtained by the proposed method. and L 2 The columns represent the numerical solutions and true solutions of each method. Error and L 2 error.

[0125] As shown in Table 1, as the ε value decreases from 1e-3 to 1e-6, the method of this application can automatically detect the location of the boundary layer and generate the corresponding non-uniform subdomain partitioning. The width of the boundary subdomain in the target subdomain partitioning gradually decreases from 6.25e-2 to 3.05e-5, accurately reflecting the thinning trend of the boundary layer thickness as ε decreases. Regarding the solution accuracy, the method of this application... Error and L 2 The error is significantly better than the comparative method: when ε=1e-3, the method of this application is significantly better. The error is 2.28e-7, L 2 The error is 6.22e-8, while PINN's The error is 9.73e-1, for both Shishkin and Bakhvalov meshes. The errors are 1.10e-4 and 2.33e-3, respectively; when ε=1e-6, the method of this application... The error remains on the order of 1.98e-10, L 2 The error is 6.70e-11, while PINN's The error is 9.59e-1, for both Shishkin and Bakhvalov meshes. The errors are 1.13e-4 and 2.34e-3, respectively. It can be seen that the solution accuracy of PINN is not ideal for all ε values, while the solution accuracy of the method in this application is several orders of magnitude higher than that of the Shishkin grid and the Bakhvalov grid for the same degrees of freedom.

[0126] Figure 5 The diagram schematically illustrates a comparison between the true solution, the PINN numerical solution, and the numerical solution of the method in this application when ε=1e-3. From... Figure 5 As can be clearly seen, the PINN numerical solution exhibits significant deviations in the boundary layer region, making it difficult to achieve satisfactory solution accuracy. In contrast, the numerical solution of the method in this application almost completely overlaps with the true solution, accurately analyzes the boundary layer, and produces a more accurate numerical solution than the layer-adaptive mesh method.

[0127] Table 1

[0128] Example 2:

[0129] Consider the following bivial perturbation reaction-diffusion problem with a boundary layer:

[0130]

[0131] The true solution to this problem is:

[0132] ,

[0133] Source Item The expression is:

[0134] .

[0135] The true solution has a thickness of [value] on each side of the rectangular region. Boundary layer.

[0136] In this embodiment, the method of this application uses 300 random eigenfunctions and 900 coordination sites in each subdomain. To more reliably evaluate the approximation error, a non-uniform tensor product grid is constructed in the boundary layer region: in each spatial direction, the boundary interval... and Each section contains 60 sampling points. There are 100 sampling points distributed within the area, among which This represents the width of the feature boundary layer. Then, the complete two-dimensional mesh is obtained through the Cartesian product of the corresponding one-dimensional sampling set.

[0137] Figure 6 The diagram illustrates the adaptive domain decomposition results for different target parameter values. In all cases, the algorithm eventually converges to a configuration of 9 subdomains. However, the width d of the boundary subdomains in the final decomposition depends on the value of ε, reflecting variations in the boundary layer thickness.

[0138] Table 2 summarizes the boundary layer thickness d at which the proposed method converges under different ε values, and and L2 error.

[0139] Table 2

[0140]

[0141] The following is combined Figures 7 to 14 The adaptive domain decomposition process for the two-dimensional perturbation reaction-diffusion problem is explained.

[0142] Figure 7 This schematically illustrates the initial domain. The above analysis results are obtained after executing the method of this application once, before any subdomain partitioning has been performed (i.e., the entire domain is treated as a subdomain, marked as ind=0). Figure 7 As shown, the maximum value of the first index field (residual distribution) of the initial global approximate solution is 1.8e-02, the maximum value of the second index field (gradient distribution, gradx) along the x-direction is 2.2e+00, and the maximum value of the second index field (gradient distribution, grady) along the y-direction is 2.1e+00. Based on this result, it can be determined that the current subdomain partitioning is completely insufficient to capture the local abrupt changes in the solution, the solution accuracy is far from meeting the standard, and since the solution exhibits drastic changes in multiple directions, subsequent uniform refinement in multiple directions can be performed to provide a reliable initial reference solution for adaptive splitting and merging.

[0143] Figure 8 This schematically illustrates the initial domain after the first round of uniform refinement. The analysis results when the domain is uniformly divided into four subdomains (labeled as ind=0, ind=1, ind=2, and ind=3). For example... Figure 8 As shown, the maximum values ​​of the first index field (residual distribution) for the four subdomains are 1.1e-03, 1.3e-03, 1.2e-03, and 1.1e-03, respectively, while the maximum values ​​of the second index field (gradient distribution, gradx and grady) along the x and y directions for each subdomain are both 2.1e+00. At this point, the minimum residual for each subdomain is still greater than the preset threshold, indicating that the current division of the four subdomains is insufficient to accurately capture the local abrupt changes in the solution, and the global computation point density can be further increased. Therefore, each subdomain will be further refined uniformly. Figure 9 The illustration schematically shows the analysis results when the domain is further divided into sixteen subdomains (labeled ind=0 to ind=15) after the second round of uniform refinement. Figure 9As shown, the first index field (residual distribution) and the second index field (gradient distribution) of each subdomain exhibit obvious spatial differentiation characteristics. Among them, the residual values ​​of the subdomains located in the central region of the domain (such as ind=0, ind=5, ind=10, ind=15) have decreased to the order of 5.5e-09 to 3.3e-08, and the corresponding gradient magnitudes are also relatively small (approximately 5.7e-02 to 6.0e-02), indicating that the solution accuracy in these regions is relatively high and the changes in the solution are relatively gentle. The residual values ​​of subdomains located at the edge of the domain (such as ind=1, ind=2, ind=3, ind=4, ind=6, ind=7, ind=8, ind=9, ind=11, ind=12, ind=13, ind=14) are still in the range of 7.3e-06 to 5.7e-05, with corresponding gradient magnitudes as high as 2.1e+00 to 4.2e+00 in the x or y directions. This indicates that the solutions in these regions (corresponding to the boundary layer positions) still exhibit drastic changes, and the local solution accuracy is still insufficient. At this point, the minimum residual of each subdomain has significantly decreased, indicating that after two rounds of uniform refinement, the current subdomain partitioning can obtain a reliable reference solution, which can provide a basis for subsequent merging operations. Therefore, the first merging stage will begin, merging adjacent subdomains that meet the merging conditions to release redundant computing resources.

[0144] Figure 10 The illustration shows the analysis results after the first merge operation, when the number of subdomains was reduced from sixteen to thirteen (labeled as ind=0 to ind=12). Figure 10 As shown, multiple subdomains located in the central region of the domain have been merged into a single subdomain (e.g., ind=12), with a residual value of 6.1e-09 and a gradient magnitude of approximately 5.7e-02. This indicates that the solution accuracy in the merged region remains high, and the solution changes smoothly, verifying the rationality of the merging operation. After merging, the first and second index fields of each subdomain are recalculated. The residual values ​​of the subdomains located in the edge region of the domain (e.g., ind=0 to ind=11) are on the order of 1.2e-05 to 5.7e-05, and the gradient magnitudes are as high as 2.8e+00 to 4.2e+00 in the x- or y-direction, indicating that there is still room for improvement in the solution accuracy of the boundary layer region, requiring further splitting operations for refinement. Therefore, based on the current first and second index fields of each subdomain, the first subdomain will be identified and a splitting operation will be performed.

[0145] Figure 11 The illustration schematically shows the analysis results when, after the first merging operation, the first subdomain is identified based on the first and second index fields of each subdomain, and a splitting operation is performed, resulting in thirty-three subdomains (labeled as ind=0 to ind=32). (Only data from subdomains labeled ind=0 to ind=28 are shown.) Figure 11As shown, the solution accuracy of each subdomain exhibits significant differences after the splitting operation. The residual values ​​of the subdomains located within the domain (such as ind=0, ind=2, ind=4, ind=8, ind=9, ind=13, ind=16, ind=17, ind=20, ind=24, ind=25) have decreased to the order of 1.0e-10 to 5.1e-11, and even as low as 4.0e-13. The gradient magnitude is also relatively small (approximately 3.8e-02 to 1.4e-01), indicating that the solution accuracy in these regions has reached a relatively high level, and the changes in the solution tend to be gradual.

[0146] In contrast, the subdomains located in the boundary layer region exhibit distinct directional gradient characteristics. Some subdomains (e.g., ind=1, ind=7, ind=10, ind=14, ind=19, ind=23, ind=26) show gradient magnitudes as high as 7.4e+00 to 8.2e+00 in the x-direction, while the gradient magnitudes in the y-direction are only 1.4e-02 to 3.6e-02, indicating that the solution changes drastically along the x-direction and gradually along the y-direction within these subdomains. Other subdomains (e.g., ind=3, ind=6, ind=11, ind=15, ind=18, ind=22, ind=27) show gradient magnitudes as high as 8.1e+00 to 8.2e+00 in the y-direction, while the gradient magnitudes in the x-direction are only 1.4e-02 to 3.6e-02, indicating that the solution changes drastically along the y-direction and gradually along the x-direction within these subdomains. Furthermore, the subdomains located in the corner regions (such as ind=5, ind=12, ind=21, ind=28) have high gradient magnitudes in both the x and y directions (approximately 7.4e+00), indicating that the solutions change drastically in both directions within these subdomains.

[0147] The above results demonstrate that the splitting operation successfully directed computational resources to the boundary layer region, significantly improving the solution accuracy of each subdomain. Furthermore, the differences in gradient directions among the different subdomains provide a basis for subsequent merging operations. Therefore, a second merging stage can be initiated, merging adjacent subdomains that meet the merging conditions to further free up redundant computational resources.

[0148] Figure 12 The illustration shows the analysis results after the second merge operation, when the number of subdomains was reduced from thirty-three to twenty-one (labeled as ind=0 to ind=20). Figure 12 As shown, multiple subdomains located within the domain have been merged into a single subdomain (e.g., ind=20), with a residual value of 2.3e-10 and gradient magnitudes of 7.6e-02 in both the x and y directions. This indicates that the solution accuracy of the merged region remains high, the solution changes smoothly, and the merging operation effectively releases redundant computational resources.

[0149] After merging, the first index field and the second index field of each subdomain are recalculated. Subdomains located in the boundary layer region still maintain significant directional gradient characteristics: some subdomains (such as ind=0, ind=4, ind=5, ind=8, ind=11, ind=14, ind=15, ind=19) have gradient magnitudes as high as 8.1e+00 to 8.2e+00 in the x-direction, while the gradient magnitudes in the y-direction are only 1.4e-02 to 3.6e-02, indicating that the solution changes drastically along the x-direction and gradually along the y-direction; other subdomains (such as ind=1, ind=3, ind=6, ind=9, ind=10, ind=13, ind=16, ind=18) have gradient magnitudes as high as 8.1e+00 to 8.2e+00 in the y-direction, while the gradient magnitudes in the x-direction are only 1.4e-02 to 3.6e-02, indicating that the solution changes drastically along the y-direction and gradually along the x-direction. The subdomains located in the corner regions (such as ind=2, ind=7, ind=12, ind=17) have gradient magnitudes of approximately 7.4e+00 in both the x and y directions, and residual values ​​ranging from 4.7e-07 to 2.0e-06, indicating that there is still room for further improvement in the solution accuracy of these subdomains. Therefore, based on the first and second index fields of each current subdomain, the first subdomain can be identified and further splitting operations can be performed.

[0150] Figure 13 The illustration schematically shows the analysis results after the second merging operation, where the first subdomain is further identified and a splitting operation is performed based on the first and second index fields of each subdomain, resulting in forty-nine subdomains (labeled ind=0 to ind=48). (Only data from subdomains labeled ind=0 to ind=28 are shown.) Figure 13 As shown, after this round of splitting operations, the solution accuracy of each subdomain shows further differentiation and improvement.

[0151] The residual values ​​of subdomains located in the central region of the domain (such as ind=0, ind=26) have decreased to the order of 3.1e-13 to 5.0e-13, and the gradient magnitudes in both the x and y directions are approximately 7.6e-02 to 2.1e-02, indicating that the solution accuracy in these regions has reached an extremely high level, and the solution changes gradually. The residual values ​​of subdomains located in the transitional region at the edge of the domain (such as ind=1, ind=3, ind=5, ind=9, ind=11, ind=14, ind=15, ind=18, ind=22, ind=23, ind=27) are in the order of 1.0e-11 to 1.0e-10, with smaller gradient magnitudes (approximately 5.3e-02 to 2.2e-01), and the solution accuracy is also relatively high.

[0152] In contrast, subdomains located in the core region of the boundary layer still maintain significant directional gradient characteristics. Some subdomains (e.g., ind=2, ind=6, ind=12, ind=13, ind=17, ind=21, ind=28) exhibit gradient magnitudes as high as 1.6e+01 in the x-direction, while the gradient magnitudes in the y-direction are only 7.5e-03 to 5.0e-02, indicating that the solution still exhibits drastic changes along the x-direction. Other subdomains (e.g., ind=4, ind=7, ind=10, ind=16, ind=20, ind=24, ind=25) also exhibit gradient magnitudes as high as 1.6e+01 in the y-direction, while the gradient magnitudes in the x-direction are only 7.5e-03 to 1.9e-02, indicating that the solution still exhibits drastic changes along the y-direction. The gradient magnitudes of the subdomains located in the corner regions (such as ind=8 and ind=19) in both the x and y directions are approximately 1.3e+01, and the residual values ​​are in the range of 4.3e-08 to 4.8e-08.

[0153] The above results show that after this round of splitting operations, the solution accuracy of each subdomain is further improved, and the directional characteristics of the boundary layer region are clearer. At the same time, the gradient characteristics of some adjacent subdomains tend to be similar, providing conditions for further merging operations. Therefore, we can proceed to the final merging stage. Figure 14 The illustration shows the final target subdomain partitioning result after multiple iterations of splitting and merging, comprising nine subdomains (labeled ind=0 to ind=8). Figure 14 As shown, the subdomains located in the central region of the domain have been merged into a single subdomain (e.g., ind=5), with a residual value of 8.7e-08. The gradient magnitudes in both the x and y directions are between 8.6e-02 and 8.7e-02, indicating that the solution changes gradually in this region and the solution accuracy meets the requirements. The residual values ​​of the four subdomains located in the corner regions of the domain (e.g., ind=0, ind=1, ind=2, ind=3) are on the order of 8.0e-09 to 5.3e-08, and the gradient magnitudes in both the x and y directions are approximately 1.3e+01, indicating that the solution accuracy of these subdomains has met the requirements, but the solutions exhibit relatively drastic changes in both directions. The subdomains located at the edge of the domain exhibit clear directional characteristics: some subdomains (such as ind=4, ind=7) have a gradient magnitude as high as 1.6e+01 in the x-direction, while the gradient magnitude in the y-direction is only 1.7e-02, indicating that the solution changes drastically along the x-direction and gradually along the y-direction; other subdomains (such as ind=6, ind=8) have a gradient magnitude as high as 1.6e+01 in the y-direction, while the gradient magnitude in the x-direction is only 1.7e-02, indicating that the solution changes drastically along the y-direction and gradually along the x-direction.

[0154] As shown in the figure, through adaptive splitting and merging dynamic adjustments, the subdomains of the boundary layer region are sufficiently refined to capture abrupt changes in the solution, while the subdomains of the internal, relatively flat regions maintain a larger size to save computational resources. This ultimately achieves a directional allocation of computational resources to singular regions, achieving a balance between computational overhead and solution accuracy. The subdomain partitioning result satisfies the preset termination condition and is used as the target subdomain partitioning output; the corresponding global approximate solution is the final approximate solution to the problem to be solved. Based on the above adaptive allocation method for computational resources, this application also provides an adaptive allocation device for computational resources. The following will combine... Figure 15 The device is described in detail.

[0155] like Figure 15 As shown, the adaptive allocation device 1500 for computing resources in this embodiment includes an acquisition module 1501, a conversion module 1502, a solution module 1503, an allocation module 1504, and an iteration module 1505.

[0156] The acquisition module 1501 is used to acquire the problem to be solved, discretize the continuous domain of the problem to be solved into multiple subdomains, and assign a set of computation points to each subdomain.

[0157] The transformation module 1502 is used to construct a random feature function in each subdomain using pre-generated random feature parameters, and to construct a local approximation function for each subdomain based on the random feature function and the unit decomposition function, so as to transform the problem to be solved into a solvable problem.

[0158] The solver module 1503 is used to obtain a global approximate solution by solving a solvable problem, and to calculate a first index field representing the distribution of the solution error within the defined domain, and a second index field representing the degree of solution variation within each subdomain, based on the global approximate solution.

[0159] The allocation module 1504 is used to perform a segmentation operation on the first subdomain and / or a merging operation on the second subdomain according to the first index field and the second index field; wherein the first subdomain is the subdomain whose solution accuracy indicated by the first index field does not meet the first accuracy condition, and the second subdomain is the adjacent subdomain whose solution accuracy after merging meets the similarity condition of the second index field and meets the second accuracy condition.

[0160] The iteration module 1505 is used to repeatedly execute the above steps until the subdomains after the partitioning and merging operations meet the preset termination conditions, thereby obtaining the target subdomain partitioning result of the problem to be solved and the corresponding global approximate solution.

[0161] It is understood that the acquisition module 1501, conversion module 1502, solution module 1503, allocation module 1504, and iteration module 1505 can be implemented in one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of the present invention, at least one of the acquisition module 1501, conversion module 1502, solution module 1503, allocation module 1504, and iteration module 1505 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging circuitry, or as hardware or firmware implementations, or as appropriate combinations of software, hardware, and firmware implementations. Alternatively, at least one of the acquisition module 1501, transformation module 1502, solution module 1503, allocation module 1504, and iteration module 1505 may be implemented at least partially as a computer program module, which can perform the functions of the corresponding module when the program is run by a computer.

[0162] Figure 16 The schematic diagram illustrates a structural block diagram of an electronic device provided in an embodiment of this application.

[0163] like Figure 16 As shown, the electronic device described in this embodiment includes: electronic device 1600 including processor 1610 and computer-readable storage medium 1620. The electronic device 1600 can perform the above-described reference... Figure 1 The described method enables the detection of specific operations.

[0164] Specifically, processor 1610 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. Processor 1610 may also include onboard memory for caching purposes. Processor 1610 may be used for executing reference... Figure 1 The method flow described according to the embodiments of this application refers to a single processing unit or multiple processing units for different actions.

[0165] Computer-readable storage medium 1620 can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, readable storage media can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, apparatuses, or propagation media. Specific examples of readable storage media include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); memories such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0166] Computer-readable storage medium 1620 may include computer program 1621, which may include code / computer-executable instructions that, when executed by processor 1610, cause processor 1610 to perform, for example, the above-described combination. Figure 1 The described method and any variations thereof.

[0167] Computer program 1621 can be configured to have computer program code, for example, including computer program modules. For example, in an exemplary embodiment, the code in computer program 1621 may include one or more program modules, such as 1621A, module 1621B, ... It should be noted that the division and number of modules are not fixed. Those skilled in the art can use appropriate program modules or combinations of program modules according to the actual situation. When these combinations of program modules are executed by processor 1610, processor 1610 can perform, for example, the above-described combinations... Figures 1-14 The described method and any variations thereof.

[0168] According to an embodiment of the present invention, at least one of the acquisition module 1501, the transformation module 1502, the solution module 1503, the allocation module 1504, and the iteration module 1505 can be implemented as a reference. Figure 16 The described computer program module, when executed by processor 1610, can perform the corresponding operations described above.

[0169] This application also provides a computer-readable medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0170] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

[0171] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.

Claims

1. An adaptive allocation method for computing resources, applied to a computer system, characterized in that, include: Obtain the problem to be solved, discretize the continuous domain of the problem to be solved into multiple subdomains, and assign a set of computation points to each subdomain; Within each subdomain, a random feature function is constructed using pre-generated random feature parameters, and a local approximation function for each subdomain is constructed based on the random feature function and the unit decomposition function, so as to transform the problem to be solved into a solvable problem; A global approximate solution is obtained by solving the solvable problem. Based on the global approximate solution, a first index field characterizing the distribution of the solution error within the defined domain and a second index field characterizing the degree of solution variation within each of the subdomains are calculated. Based on the first index field and the second index field, a segmentation operation is performed on the first subdomain, and / or a merging operation is performed on the second subdomain; wherein, the first subdomain is the subdomain whose solution accuracy indicated by the first index field does not meet the first precision condition, and the second subdomain is the adjacent subdomain whose solution accuracy after merging meets the similarity condition of the second index field and meets the second precision condition; Repeat the above steps until the subdomains after the segmentation and merging operations meet the preset termination conditions, and obtain the target subdomain partitioning result and the corresponding global approximate solution of the problem to be solved.

2. The method according to claim 1, characterized in that, The segmentation operation performed on the first subdomain includes: Based on the second index field, the degree of solution variation of the first subdomain in each spatial dimension of the defined domain is obtained; When the ratio of the degree of change of the solution in at least one spatial dimension to the degree of change of the solution in all other spatial dimensions exceeds a preset ratio threshold, the first subdomain is split into at least two subdomains along each of the spatial dimensions. When the ratio of the degree of change of the solution in each spatial dimension to the degree of change of the solution in the other spatial dimensions does not exceed the preset ratio threshold, the first subdomain is uniformly divided into a preset number of subdomains.

3. The method according to claim 1, characterized in that, The merging operation on the second subdomain includes: Based on the first index field, the magnitude of the solution error of each subdomain is obtained, and the magnitude of the magnitude of the change is used to characterize the difference between the solution errors of each subdomain. When the magnitude change exceeds a preset change threshold, and the second index field of the adjacent subdomains satisfies the similarity condition and the solution accuracy after merging satisfies the second accuracy condition, a merging operation is performed on the adjacent subdomains. When the magnitude change does not exceed the preset change threshold, and the second index field of the adjacent subdomains meets the similarity condition, a merging operation is performed on the adjacent subdomains.

4. The method according to claim 3, characterized in that, After performing the merge operation on the adjacent subdomains, the method further includes: Based on the merged subdomain partitioning, the solvable problem is solved again to obtain a global approximate solution and the first index field is calculated. When the solution accuracy of the newly obtained first index field decreases by more than a preset range compared to before the merge, the merge operation is canceled.

5. The method according to claim 1, characterized in that, The first index field is constructed based on the residual obtained by substituting the global approximate solution into the control equation and boundary conditions of the problem to be solved; The second index field is constructed based on the gradient magnitude of the global approximation solution in each of the subdomains.

6. The method according to claim 1, characterized in that, The method further includes: When the governing equation of the problem to be solved contains a target parameter, and the value of the target parameter is less than a preset parameter threshold, a parameter sequence is constructed that changes sequentially to the value of the target parameter. For each parameter value in the parameter sequence other than the target parameter, the corresponding target subdomain partitioning result is obtained based on the parameter value, and the target subdomain partitioning result is used as the initial subdomain partitioning for the next parameter value in the parameter sequence; Based on the values ​​of the target parameters and the corresponding initial subdomain partitioning, a global approximate solution corresponding to the values ​​of the target parameters is obtained.

7. The method according to claim 1, characterized in that, The problem to be solved is a singular perturbation problem; The step of constructing local approximation functions for each of the subdomains based on the random characteristic function and the unit decomposition function to transform the problem to be solved into a solvable problem includes: The local approximation functions are combined into a global approximation function using the unit decomposition function; The global approximation function is substituted into the control equations and boundary conditions of the singular perturbation problem, and the deviations are calculated at each placement point within the domain to construct a weighted loss function, thereby transforming the singular perturbation problem into a solvable minimization loss function problem.

8. An adaptive allocation device for computing resources, characterized in that, include: The acquisition module is used to acquire the problem to be solved, discretize the continuous domain of the problem to be solved into multiple subdomains, and assign a set of computation points to each subdomain; The transformation module is used to construct a random feature function using pre-generated random feature parameters within each subdomain, and to construct a local approximation function for each subdomain based on the random feature function and the unit decomposition function, so as to transform the problem to be solved into a solvable problem. The solution module is used to obtain a global approximate solution by solving the solvable problem, and to calculate a first index field characterizing the distribution of solution error in the domain and a second index field characterizing the degree of solution variation in each subdomain based on the global approximate solution. The allocation module is used to perform a segmentation operation on a first subdomain and / or a merging operation on a second subdomain based on the first index field and the second index field; wherein the first subdomain is a subdomain whose solution accuracy indicated by the first index field does not meet the first precision condition, and the second subdomain is an adjacent subdomain whose solution accuracy after merging meets the similarity condition of the second index field and meets the second precision condition. The iterative module is used to repeatedly execute the above steps until the subdomains after the segmentation operation and the merging operation meet the preset termination conditions, so as to obtain the target subdomain partitioning result and the corresponding global approximate solution of the problem to be solved.

9. An electronic device, comprising: One or more processors; Storage device for storing one or more computer programs. The characteristic is that, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable instructions stored thereon, characterized in that, When executed by the processor, this instruction causes the processor to perform the method according to any one of claims 1 to 7.