Method and device for processing data through neural network model and related product

The neural network model predicts the initial value deviation of linear equation systems and corrects the initial value, solving the problem of low initial value accuracy in the prior art, and improving the solution efficiency.

CN119647303APending Publication Date: 2025-03-18HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311201785.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When determining the initial value of a system of linear equations, the change law indicated by the preset function is very different from the actual change law, resulting in low initial value accuracy, thereby increasing the number of iterations and reducing the solution efficiency.

Method used

The neural network model predicts the deviation between the initial value of the current time of the linear equation system and the numerical solution, and outputs estimated difference data to correct the initial value and improve the accuracy.

Benefits of technology

The accuracy of the initial values ​​of the system of linear equations is improved, the number of iterations is reduced, and the efficiency of solving numerical solutions of the system of linear equations is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647303A_ABST
    Figure CN119647303A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for processing data through a neural network model and a related product, and belongs to the technical field of mathematical application. The method comprises the steps that data needing to be processed by a neural network model in an application are obtained, the data are input data of the neural network model, and the input data indicate the actual deviation between an initial value and a numerical solution of a linear equation set needing to be calculated by the application before the current moment; and based on the input data, outputting pre-estimated differential data at the current moment through the neural network model. In the embodiment of the invention, the deviation between the initial value of the linear equation set needing to be calculated at the current moment and the numerical solution to be solved is predicted through the neural network model, namely, the difference data is estimated. According to the method, the estimated difference data is acquired, so that the initial value of the current moment is subsequently corrected based on the estimated difference data, the initial value closer to the numerical solution is obtained, namely the initial value with higher precision is obtained, and the calculation process of solving the numerical solution of the linear equation set based on the initial value is accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of mathematical application technology, and in particular, to a method, device and related products for processing data through a neural network model. Background Art

[0002] For dynamic systems that evolve over time, such as weather changes or fluid motion, dynamic equations can be constructed to describe the physical quantities in such systems, and the values ​​of the physical quantities at future moments can be inferred by calculating the dynamic equations. When calculating the dynamic equations, the dynamic equations are first parameterized into a linear equation system, where the variables of the linear equation system include the physical quantities in the dynamic system. Then, the initial values ​​of the variables of the linear equation system are given, referred to as the initial values ​​of the linear equation system. Based on the initial values, the numerical solutions of the variables of the linear equation system that meet the accuracy requirements are gradually converged through iteration, referred to as the numerical solutions of the linear equation system.

[0003] The related technology is to use the extrapolation method to determine the initial value of the linear equation system at the current moment through a preset function. The preset function can be, for example, a linear function, a parabolic function, etc. Taking the preset function as a linear function as an example, the numerical solutions of the linear equation system at the two most recent historical moments before the current moment are obtained, and the linear function is constructed using the numerical solutions corresponding to the two historical moments. The linear function is extrapolated to obtain the values ​​of the variables of the linear equation system at the current moment, and the extrapolated values ​​are used as the initial values ​​of the linear equation system at the current moment.

[0004] In the extrapolation method, if the change law indicated by the preset function is significantly different from the actual change law of the variables of the linear equations, the distance between the initial value of the linear equations obtained by the extrapolation method and the final numerical solution of the linear equations will be relatively large, that is, the accuracy of the initial value of the linear equations obtained by extrapolation is relatively low, so the subsequent process of solving the numerical solution based on the initial value requires more iterations, resulting in lower efficiency in solving the numerical solution of the linear equations. Summary of the invention

[0005] The embodiment of the present application provides a method, device and related products for processing data through a neural network model, which can improve the accuracy of the initial value of the linear equation system that needs to be calculated by the application, thereby accelerating the process of solving the linear equation system by the application. The technical solution is as follows:

[0006] In the first aspect, a method for processing data through a neural network model is provided. In the method, data that needs to be processed by the neural network model in an application is obtained, and the data is the input data of the neural network model, and the input data indicates the actual deviation between the initial value and the numerical solution of the linear equation group that needs to be calculated by the application before the current moment; based on the input data, the estimated differential data at the current moment is output through the neural network model, and the estimated differential data indicates the estimated deviation between the first initial value of the linear equation group at the current moment and the numerical solution to be solved of the linear equation group at the current moment, and the application is used to calculate the numerical solution of the linear equation group at the current moment based on the second initial value, and the second initial value is obtained by the estimated differential data and the first initial value.

[0007] In the embodiment of the present application, the deviation between the initial value of the linear equation group to be calculated at the current moment and the numerical solution to be solved is predicted by the neural network model, that is, the estimated differential data. This is to facilitate the subsequent correction of the initial value at the current moment based on the estimated differential data to obtain an initial value closer to the numerical solution, that is, an initial value with higher accuracy, thereby accelerating the calculation process of the application to solve the numerical solution of the linear equation group based on the initial value.

[0008] Based on the method provided in the first aspect, in some possible implementations, the input data includes N actual differential data corresponding to N historical moments before the current moment and closest to the current moment, N is a positive integer, and each of the N actual differential data indicates the actual deviation between the initial value and the numerical solution of the linear equations at the corresponding historical moment.

[0009] In an embodiment of the present application, the estimated differential data at the current moment can be predicted based on the actual differential data at the most recent several historical moments before the current moment to improve the prediction accuracy.

[0010] Based on the method provided in the first aspect, in some possible implementations, the first initial value is related to the numerical solution of the linear equation system before the current moment. In this way, the distance between the first initial value and the numerical solution finally solved can be reduced, based on which, the distance between the corrected second initial value and the numerical solution finally solved is smaller, that is, the accuracy of the second initial value is improved.

[0011] Based on the method provided in the first aspect, in some possible implementations, the first initial value is a numerical solution of the linear equation system at a historical moment before the current moment and closest to the current moment.

[0012] In most cases, the numerical solution to be solved at the current moment is close to the numerical solution at a historical moment before the current moment and closest to the current moment. Therefore, setting the first initial value to the numerical solution of the linear equations at a historical moment before the current moment and closest to the current moment can further improve the accuracy of the first initial value and correspondingly improve the accuracy of the corrected second initial value.

[0013] Based on the method provided in the first aspect, in some possible implementations, the implementation process of obtaining the data that needs to be processed by the neural network model in the application is: receiving a model call request from the application through an inference interface, and the model call request carries input data. Accordingly, based on the input data, after the estimated differential data at the current moment is output through the neural network model, the estimated differential data is also sent to the application through the inference interface, and the application is also used to correct the first initial value based on the estimated differential data to obtain a second initial value.

[0014] When the application needs to solve the numerical solution of the linear equations at the current moment, the model call request carrying the input data can be sent to the software module packaged by the method provided by the embodiment of the present application through the inference interface, so as to obtain the estimated differential data at the current moment through the method provided by the embodiment of the present application, and then the application can correct the first initial value based on the estimated differential data to obtain a second initial value with higher accuracy.

[0015] Based on the method provided in the first aspect, in some possible implementations, the implementation process of obtaining data that needs to be processed by the neural network model in the application is: receiving a model call request from the application through an inference interface, the model call request carrying input data and a first initial value. Accordingly, based on the input data, after the estimated differential data at the current moment is output through the neural network model, the first initial value is corrected based on the estimated differential data to obtain a second initial value, and the second initial value is sent to the application through the inference interface.

[0016] When the application needs to solve the numerical solution of the linear equations at the current moment, the model call request carrying the input data and the first initial value can also be sent to the software module packaged by the method provided by the embodiment of the present application through the inference interface to obtain a second initial value with higher accuracy through the method provided by the embodiment of the present application.

[0017] Based on the method provided in the first aspect, in some possible implementations, before receiving the model call request from the application through the inference interface, a model initialization request from the application is also received through the initialization interface; the neural network model is loaded into the memory based on the model initialization request; and the address of the neural network model in the memory is sent to the application through the initialization interface. The model call request also carries the address of the neural network model in the memory.

[0018] In the implementation of the present application, before calling the software module packaged by the method provided by the embodiment of the present application through the reasoning interface, the application can also initialize some information, such as initializing the neural network model in the software module, to improve the subsequent execution speed of the software module.

[0019] Based on the method provided in the first aspect, in some possible implementations, after the first initial value is corrected based on the estimated differential data, a memory release request is received from the application through the memory release interface, and the memory release request carries the address of the neural network model in the memory; based on the memory release request, the neural network model is deleted from the memory.

[0020] After the application solves the numerical solution to the linear equations, the software module packaged by the method provided by the embodiment of the present application can also receive a memory release request from the application through a memory release interface, and the memory release request carries the address of the neural network model in the memory; based on the memory release request, the neural network model is deleted from the memory, thereby avoiding excessive memory pressure.

[0021] Based on the method provided in the first aspect, in some possible implementations, the neural network model is trained based on multiple training data and multiple test data. Wherein, each training data in the multiple training data and each test data in the multiple test data corresponds to a historical moment, and each includes a sample data and a label, the sample data indicates the actual deviation between the initial value and the numerical solution of the linear equation system before the corresponding historical moment, and the label is the actual differential data of the corresponding historical moment.

[0022] By designing the above-mentioned training data and test data, the neural network model required by the embodiment of the present application can be trained.

[0023] Based on the method provided in the first aspect, in some possible implementations, the sample data includes N actual differential data corresponding one-to-one to N historical moments before the corresponding historical moment and closest to the corresponding historical moment.

[0024] Among them, the sample data in the training data and the test data can be, for example, N actual differential data corresponding one to one to the N historical moments before the corresponding historical moment and closest to the corresponding historical moment, so that the N actual differential data corresponding one to one to the N historical moments before the current moment and closest to the current moment can be input into the neural network model subsequently to output the estimated differential data of the current moment through the neural network model.

[0025] In a second aspect, a device for processing data through a neural network model is provided, wherein the device for processing data through a neural network model has the function of implementing the method for processing data through a neural network model in the first aspect. The device for processing data through a neural network model includes at least one module, and the at least one module is used to implement the method for processing data through a neural network model provided in the first aspect.

[0026] In a third aspect, a device for processing data through a neural network model is provided, wherein the structure of the device for processing data through a neural network model includes a processor and a memory, wherein the memory is used to store a program that supports the device for processing data through a neural network model to execute the method for processing data through a neural network model provided in the first aspect, and to store data involved in implementing the method for processing data through a neural network model provided in the first aspect. The processor is configured to execute the program stored in the memory. The operating device of the storage device may also include a communication bus, which is used to establish a connection between the processor and the memory.

[0027] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the method for processing data through a neural network model described in the first aspect.

[0028] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for processing data through a neural network model as described in the first aspect.

[0029] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic diagram of the architecture of a system for processing data through a neural network model provided in an embodiment of the present application;

[0031] Figure 2 This embodiment of the present application provides a method based on Figure 1 The schematic diagram of the process of the system solving the numerical solution of the linear equations at the current moment is shown;

[0032] Figure 3 This is another embodiment of the present application based on Figure 1 The schematic diagram of the process of the system solving the numerical solution of the linear equations at the current moment is shown;

[0033] Figure 4It is a flowchart of a training process for obtaining a neural network model provided in an embodiment of the present application;

[0034] Figure 5 It is a schematic diagram of the internal connection of a neural network model based on a Unet structure provided in an embodiment of the present application;

[0035] Figure 6 It is a flow chart of a method for processing data through a neural network model provided in an embodiment of the present application;

[0036] Figure 7 It is a flowchart of a method for solving a numerical solution of a thread equation group based on an interface provided by an embodiment of the present application;

[0037] Figure 8 It is another flowchart of the application providing a numerical solution of a thread equation group based on an interface according to an embodiment of the present application;

[0038] Fig. 9 It is a correspondence between a neural network model, a region, and a process provided in an embodiment of the present application;

[0039] Fig.10 It is a schematic diagram of a flow chart of determining a numerical solution of a linear equation system at the current moment provided by an embodiment of the present application;

[0040] Fig.11 is a structural schematic diagram of a device for processing data through a neural network model provided in an embodiment of the present application;

[0041] Fig.12 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the present application more clear, the implementation mode of the present application will be further described in detail below with reference to the accompanying drawings.

[0043] To facilitate subsequent understanding, the application scenarios of the embodiments of the present application are first explained here.

[0044] For some systems in nature that evolve over time, such as meteorological change systems and fluid motion systems, these systems can be described by dynamical systems theory, and accordingly, these systems can be called dynamical systems or dynamical systems. In dynamical systems theory, dynamical systems are described by differential and / or difference equations, which can be called dynamical equations. The dynamical equations can be used to infer the values ​​of various physical quantities in the dynamical system at future times, that is, to solve the values ​​of various physical quantities in the dynamical equations at future times.

[0045] A common calculation method for solving the values ​​of various physical quantities in the dynamic equations at future times is: first, the dynamic equations are parameterized into a system of linear equations, which can be expressed as Ax=b. The variable x of the linear equations includes the physical quantities in the dynamic system. Then, the initial values ​​of the variables of the linear equations are given, which are referred to as the initial values ​​of the linear equations. Based on the initial values, the numerical solutions of the variables of the linear equations that meet the accuracy requirements are gradually converged through the iteration method, which is referred to as the numerical solutions of the linear equations.

[0046] In the above process of solving the numerical solution of the system of equations, the choice of the initial value of the linear equations has a certain influence on the convergence speed of the iteration method. Theoretically, the closer the initial value is to the numerical solution, the faster the convergence will be, thereby improving the speed of solving the numerical solution.

[0047] There are currently two ways to determine the initial value of a linear equation system. One is to directly use the numerical solution of the linear equation system at the most recent historical moment before the current moment as the initial value of the linear equation system at the current moment. The other is to determine the initial value of the linear equation system at the current moment by extrapolation in combination with the numerical solution of the linear equation system at the historical moment before the current moment. The extrapolation method includes the following three examples.

[0048] (1) Linear extrapolation method: Specifically, based on the numerical solutions of the linear equations at the two most recent historical moments before the current moment, the initial value of the linear equations at the current moment is determined by the following formula using the linear relationship.

[0049]

[0050] in, is the initial value of the linear equation system at the current time (t1), is the numerical solution of the linear equation system at the first historical moment (t0) closest to the current moment, is the linear equation system at the second historical moment closest to the current moment (t -1 ) is a numerical solution of .

[0051] (2) Quadratic extrapolation based on parabolic equations. Specifically, based on the numerical solutions of the linear equations at the three most recent historical moments before the current moment, the initial value of the linear equations at the current moment is determined by the following formula using the quadratic relationship.

[0052] p t1 =a(t1)2+b(t1)+c

[0053]

[0054] in, is the linear equation system at the third historical moment closest to the current moment (t -2 ) is a numerical solution of .

[0055] (3) Nonlinear extrapolation method based on rational expressions. Specifically, based on the numerical solutions of the linear equations at the latest n historical moments before the current moment, the initial value of the linear equations at the current moment is determined using a nonlinear relationship, where n is greater than 3.

[0056] The initial values ​​of the linear equations obtained by the above extrapolation method have low accuracy, so the subsequent process of solving the numerical solution of the linear equations based on the initial values ​​requires a large number of iterations, resulting in low efficiency in solving the numerical solution of the linear equations.

[0057] Based on this, an embodiment of the present application provides a method for processing data through a neural network model. In this method, the neural network model predicts the deviation between the initial value of the linear equation group that needs to be calculated at the current moment and the numerical solution to be solved, that is, estimated differential data, so that the initial value at the current moment can be corrected based on the estimated differential data to obtain an initial value that is closer to the numerical solution, that is, an initial value with higher accuracy, thereby accelerating the calculation process of the numerical solution of the linear equation group based on the initial value.

[0058] The following is an explanation of the system, method and related devices for processing data through a neural network model provided in the embodiments of the present application.

[0059] Figure 1 Schematic diagram of the architecture of a system for processing data through a neural network model provided in an embodiment of the present application. Figure 1 As shown, the system 00 includes a model module 01 , an initialization interface 02 , a reasoning interface 03 and a memory release interface 04 .

[0060] The system 00 is used to process data to be processed in an application through a neural network model, and the application is used to solve the numerical solution of the thread equation group at the current moment through an iteration method based on the initial value. The application can also be called upper-layer software or third-party software, etc. Among them, the data to be processed by the application exemplarily includes input data of the neural network model, or exemplarily includes input data of the neural network model and the first initial value of the linear equation group at the current moment.

[0061] In some embodiments, the model module 01 is used to output the estimated differential data at the current moment based on the input data through the neural network model, so that the application can subsequently modify the first initial value of the linear equation system at the current moment based on the estimated differential data to obtain a second initial value with higher accuracy, and then solve the numerical solution of the linear equation system through the second initial value. Optionally, the model module 01 is used to output the estimated differential data at the current moment based on the input data through the neural network model, and modify the first initial value of the linear equation system at the current moment based on the estimated differential data to obtain a second initial value with higher accuracy, so that the application can subsequently solve the numerical solution of the linear equation system through the second initial value.

[0062] Among them, the neural network model is used to output the estimated differential data at the current moment based on the input data, the input data indicates the actual deviation between the initial value and the numerical solution of the linear equation group before the current moment, and the estimated differential data indicates the estimated deviation between the first initial value of the linear equation group at the current moment and the numerical solution to be solved of the linear equation group at the current moment.

[0063] To facilitate subsequent understanding, the input data and the first initial value of the neural network model are explained here.

[0064] In some embodiments, the input data indicating the actual deviation between the initial value and the numerical solution of the linear equations before the current moment can be understood as follows: the input data includes N actual differential data corresponding to the N historical moments before the current moment and closest to the current moment, N is a positive integer, and each of the N actual differential data indicates the actual deviation between the initial value and the numerical solution of the linear equations at the corresponding historical moment.

[0065] In an embodiment of the present application, the estimated differential data at the current moment can be predicted based on the actual differential data at the most recent several historical moments before the current moment to improve the prediction accuracy.

[0066] For example, if N is 1, the input data includes an actual differential data corresponding to a historical moment before the current moment and closest to the current moment. For another example, if N is 2, the input data includes two actual differential data corresponding to two historical moments before the current moment and closest to the current moment. For another example, if N is 3, the input data includes three actual differential data corresponding to three historical moments before the current moment and closest to the current moment. It should be noted that N is a preset positive integer, and N can be any positive integer, which will not be illustrated one by one here.

[0067] Optionally, in other embodiments, the input data indicating the actual deviation between the initial value and the numerical solution of the linear equations before the current moment can also be understood as: the input data is the average value of N actual differential data corresponding to the N historical moments before the current moment and closest to the current moment, where N is a positive integer greater than 1.

[0068] The above is used to illustrate the definition of the input data of the neural network model provided in the embodiment of the present application. Optionally, the definition of the input data of the neural network model provided in the embodiment of the present application may not be limited to the above two. Any input data that can indicate the actual deviation between the initial value and the numerical solution of the linear equation group before the current moment can be applied in the embodiment of the present application, and no further examples are given here.

[0069] In some embodiments, the first initial value is related to the numerical solution of the linear equations before the current moment. In this way, the distance between the first initial value and the numerical solution finally solved can be reduced, based on which the distance between the corrected second initial value and the numerical solution finally solved is smaller, that is, the accuracy of the second initial value is improved.

[0070] For example, the first initial value is the numerical solution of the linear equations at a historical moment before the current moment and closest to the current moment. In most cases, the numerical solution to be solved at the current moment and the numerical solution at a historical moment before the current moment and closest to the current moment are close to each other, so setting the first initial value to the numerical solution of the linear equations at a historical moment before the current moment and closest to the current moment can further improve the accuracy of the first initial value and correspondingly improve the accuracy of the corrected second initial value.

[0071] Optionally, the first initial value may also be an average value of numerical solutions of the linear equation group at M historical moments before the current moment and closest to the current moment, where M is a positive integer greater than 1.

[0072] The above is used to illustrate the definition of the first initial value provided in the embodiment of the present application. Optionally, the definition of the first initial value provided in the embodiment of the present application may not be limited to the above two. Any numerical value related to the numerical solution of the linear equation system before the current moment, or other default configuration numerical values ​​can be used as the first initial value in the embodiment of the present application, and will not be illustrated one by one here.

[0073] In addition, the initialization interface 02, the reasoning interface 03 and the memory release interface 04 are interfaces provided for the application. The application can call the model module 01 through these three interfaces to obtain the second initial value of the linear equation group with higher accuracy, and then solve the numerical solution of the linear equation group at the current moment through the iteration method based on the second initial value.

[0074] Among them, the application can initialize the neural network model in the model module 01 through the initialization interface 02 to load the neural network model into the memory. The application can call the neural network model in the model module 01 through the reasoning interface 03, so that the model module 01 outputs the estimated differential data of the current moment to the application, and then the application corrects the first initial value to the second initial value based on the estimated differential data of the current moment, and solves the numerical solution of the linear equation group at the current moment through the iteration method based on the second initial value. Alternatively, the application can call the neural network model in the model module 01 through the reasoning interface 03, so that the model module 01 outputs the corrected second initial value to the application, and then the application solves the numerical solution of the linear equation group at the current moment through the iteration method based on the second initial value. In addition, the application can also release the neural network model in the memory through the memory release interface 04 to save memory resources.

[0075] The detailed functions of these three interfaces will be described in detail in the subsequent method embodiments and will not be elaborated here.

[0076] It should be noted that Figure 1 The interface in the example is used for illustration. When applying the embodiment of the present application, a comparison can be provided. Figure 1 The interfaces shown may be more or fewer than the interfaces, which will not be illustrated one by one here.

[0077] Figure 2 This embodiment of the present application provides a method based on Figure 1 The system shown in FIG. 1 is a flow chart of the numerical solution of the linear equations at the current moment. Figure 2 As shown, after obtaining the input data of the neural network model, the system 00 outputs the estimated differential data at the current moment through the neural network model based on the input data, and returns the estimated differential data at the current moment to the application. In this way, the application can correct the first initial value at the current moment based on the estimated differential data to obtain the corrected second initial value, and then determine the numerical solution of the linear equation system at the current moment through the solver based on the corrected second initial value.

[0078] Figure 2 The solver in is used to solve the numerical solution of the linear equations at the current moment by an iterative method. The solver can be a generalized conjugate residual (GCR) solver, or other types of solvers.

[0079] Figure 3 This is another embodiment of the present application based on Figure 1 The system shown in FIG. 1 is a flow chart of the numerical solution of the linear equations at the current moment. Figure 3As shown, after obtaining the input data of the neural network model, the system 00 outputs the estimated differential data at the current moment through the neural network model based on the input data, and then corrects the first initial value at the current moment based on the estimated differential data to obtain the corrected second initial value, and returns the second initial value to the application. In this way, the application can determine the numerical solution of the linear equation system at the current moment through the solver based on the corrected second initial value.

[0080] in addition, Figure 1 The system 00 shown can be deployed in the cloud to provide a cloud service for the application.

[0081] Optionally, Figure 1 The system shown can also be deployed on the same platform as the application, such as a terminal device, to provide the application with a higher-precision initial value. Figure 1 The system shown may include or not include the corresponding interface. When the interface is not included, the application directly calls the model module 01 to obtain a higher-precision initial value.

[0082] based on Figures 1 to 3 It can be seen that in the embodiment of the present application, the neural network model outputs estimated differential data based on the input data. Among them, the neural network model is trained based on the training data and the test data. Here, the training process of the neural network model is explained.

[0083] In some embodiments, the neural network model is trained based on multiple training data and multiple test data, wherein each training data in the multiple training data and each test data in the multiple test data corresponds to a historical moment, and each includes a sample data and a label, the sample data indicates the actual deviation between the initial value and the numerical solution of the linear equation group before the corresponding historical moment, and the label is the actual differential data of the corresponding historical moment.

[0084] It should be noted that, since the neural network model is trained based on sample data and labels, the format of the input data of the subsequent neural network model when predicting the estimated differential data at the current moment is the same as the format of the sample data. Based on this, in some embodiments, the sample data includes N actual differential data corresponding to the N historical moments before the corresponding historical moment and closest to the corresponding historical moment. In this way, the N actual differential data corresponding to the N historical moments before the current moment and closest to the current moment can be input to the neural network model in the future, so as to output the estimated differential data at the current moment through the neural network model.

[0085] For example, if N is 1, each training data and test data includes a sample data and a label, and the sample data is an actual differential data corresponding to a historical moment before the corresponding historical moment and closest to the corresponding historical moment, and the label is the actual differential data of the corresponding historical moment.

[0086] For another example, if N is 2, each training data and test data includes a sample data and a label, and the sample data includes two actual differential data corresponding to two historical moments before the corresponding historical moment and closest to the corresponding historical moment, and the label is the actual differential data of the corresponding historical moment.

[0087] For another example, if N is 3, each training data and test data includes a sample data and a label, and the sample data includes three actual differential data corresponding to the three historical moments before the corresponding historical moment and closest to the corresponding historical moment, and the label is the actual differential data of the corresponding historical moment.

[0088] For other definitions of sample data, please refer to the definition of input data of the aforementioned neural network model when predicting the estimated differential data at the current moment, and no further examples will be given here.

[0089] In addition, the sample data can be represented by a 4-dimensional matrix. The size of the 4-dimensional matrix is ​​[b, c, h, w]. Among them, b represents the batch size, that is, the number of samples included in a batch, and a batch is used for one training. C represents the number of channels of each sample data. For example, when the numerical value of the sample data is represented by red-green-blue (RGB) values, the number of channels is 3. H represents the height of the sample data, which can be understood as the number of data included in the sample data in a certain dimension. W represents the width of the sample data, which can be understood as the number of data included in the sample data in another dimension.

[0090] For example, the thread equations are obtained by parameterizing the dynamic equations that describe the global weather system. In this scenario, the width of the sample data can be understood as the number of data points at different locations in the longitude direction, and the height of the sample data can be understood as the number of data points at different locations in the latitude direction.

[0091] Correspondingly, the label can also be represented by a 4-dimensional matrix, which will not be described in detail here.

[0092] In addition, in the embodiment of the present application, the training data and the test data can be provided by an application that needs to calculate a linear equation system. For example, the application provides a historical differential data sequence, which includes a plurality of actual differential data corresponding to a plurality of historical moments. Based on the historical differential data sequence, according to the format of the training data and the test data, a plurality of training data and a plurality of test data can be obtained.

[0093] For example, the historical differential data sequence includes 100 actual differential data corresponding to 100 historical moments, and N is 2, then 98 sample data and labels corresponding to the 98 sample data can be obtained. 80% of the sample data and the corresponding labels of the 98 sample data are used as training data, and the remaining 20% ​​of the sample data and the corresponding labels are used as test data.

[0094] After obtaining the training data and the test data, the neural network model required by the embodiment of the present application can be obtained by training based on the training data and the test data. Among them, multiple training data can be called a training set, and multiple test data can be called a test set.

[0095] In some embodiments, the implementation method of training a neural network model based on multiple training data and multiple test data can be: train the initialized neural network model with the training data in the training set, stop training when the number of training iterations reaches a threshold or the training process converges, output the neural network model after each iteration in the training process, obtain multiple neural network models, and then test the prediction accuracy of each neural network model with a test set, and the prediction accuracy indicates the distance between the estimated differential data output by the corresponding neural network model based on the sample data in the test set and the label in the test set. The larger the distance, the lower the prediction accuracy, and the smaller the distance, the higher the prediction accuracy. Then select the neural network model with the highest prediction accuracy from the multiple neural network models as the neural network model for subsequent prediction of the estimated differential data at the current moment.

[0096] The convergence of the training process can be understood as the value of the loss function of the trained neural network model does not change substantially. The loss function can be exemplarily the following function:

[0097]

[0098] in, It is the label corresponding to a sample data in the test set, that is, the actual differential data at a certain historical moment. It is the estimated differential data output by the neural network model based on the sample data, that is, the estimated differential data at a certain historical moment.

[0099] Figure 4 1 is a flow chart of a training process for obtaining a neural network model provided in an embodiment of the present application. Figure 4 As shown, for any moment t, the moment closest to the moment before this moment ( Figure 4 The numerical solution x of the linear equation system is called the previous moment t-1 As the initial value at time t, the numerical solution x of the linear equation system at time t is then determined based on the GCR solver. t , then the actual differential data at time t After obtaining actual differential data at many moments, multiple test data and multiple training data can be determined based on the aforementioned setting of N. Multiple neural network models are then trained based on the training data, and the prediction accuracy of each neural network model is tested based on the test data. The neural network model with the highest prediction accuracy is then output, so that the neural network model can subsequently predict the estimated differential data at the current moment.

[0100] It should be noted that the training process of the neural network model can be performed offline on training resources such as a graphic processing unit (GPU), and the embodiments of the present application do not limit the device for training the neural network model.

[0101] In addition, the embodiments of the present application do not limit the internal structure of the neural network model. For example, any model structure capable of supervised learning can be applied in the embodiments of the present application.

[0102] In some embodiments, when the input data of the neural network model is the actual difference number corresponding to the most recent historical moment before the current moment, since the output data of the neural network model is the estimated difference data of the current moment. Therefore, the input size and output size of the neural network model structure are equal. In this scenario, the neural network model can be exemplarily a U-shaped convolutional neural network (UNet), which generally includes an input layer, a feature extraction layer and a feature output layer. Among them, the input layer is used to input the input data into the neural network model. The feature extraction layer is used to extract features of various sizes of the input data. The feature output layer is used to output the prediction results.

[0103] Figure 5 It is a schematic diagram of the internal connection of a neural network model based on a Unet structure provided in an embodiment of the present application. Figure 5Each rectangular block in represents data. The horizontal arrows indicate the processing of convolution layer + batch normalization (BN) layer + rectified linear unit (ReLU) layer for feature extraction. The downward arrow indicates downsampling of the data, and the upward arrow indicates upsampling of the data. Downsampling can reduce the size of the data and obtain the features of the data at multiple scales. Upsampling can increase the size of the data and achieve the fusion of data of corresponding sizes through channel splicing, thereby improving the ability to express data features.

[0104] The working principle of the convolution layer is as follows: pre-set the size of the convolution layer, for example, a number of cin*3*3 matrices as convolution kernels, mark a number as cout, initialize the parameters of the convolution kernel [w i The convolution kernel slides from left to right and from top to bottom on the feature map according to the step size, and calculates the sum of the dot products of the areas corresponding to the convolution kernel in turn as the eigenvalues ​​of the corresponding positions. For example, the input matrix area corresponding to the convolution kernel is [a i ], then the feature data of the center point after convolution is N represents the size of the convolution kernel cin*3*3. If there are cout convolution kernels, then cout feature data will be generated.

[0105] The working principle of the BN layer is to normalize the data so that the data is converted into a standard normal distribution, thereby ensuring the stability of the neural network model during the training process.

[0106] The working principle of the ReLU layer is to perform nonlinear transformation on the data and increase the nonlinear expression of the neural network model. For example, the feature data output by the convolutional layer is expressed nonlinearly as

[0107] In addition, downsampling can be implemented by pooling or a convolution kernel with stride=n (n>=2). Upsampling can be implemented by deconvolution or upsampling.

[0108] It should be noted that Figure 5 It is used to illustrate the structure of the neural network model provided in the embodiments of the present application and does not constitute a limitation on the implementation of the present application.

[0109] Figure 6 1 is a flow chart of a method for processing data through a neural network model provided in an embodiment of the present application. Figure 6 As shown, the method includes the following steps.

[0110] Step 601: Obtain data that needs to be processed by a neural network model in an application, where the data is input data of the neural network model, and the input data indicates the actual deviation between the initial value and the numerical solution of the linear equation group that needs to be calculated by the application before the current moment.

[0111] Optionally, when Figure 1 The model module shown is also used to correct the first initial value of the linear equation group at the current moment based on the output of the neural network model. At this time, the first initial value of the linear equation group at the current moment can be further obtained.

[0112] The input data of the neural network model and the first initial value of the linear equations at the current moment have been explained above and will not be repeated here.

[0113] based on Figure 1 As can be seen from the architecture shown, the application can implement the method provided by the embodiment of the present application through some interfaces. Based on this, in some embodiments, the implementation method of obtaining data that needs to be processed by the neural network model in the application can be: receiving a model call request from the application through an inference interface, and the model call request carries input data.

[0114] In other words, when the application needs to find the numerical solution to the linear equations at the current moment, it can send a model call request carrying input data to the model module through the inference interface to obtain the estimated differential data at the current moment through the model module. The application can then correct the first initial value based on the estimated differential data to obtain a second initial value with higher accuracy.

[0115] Accordingly, when Figure 1 When the model module shown is also used to correct the first initial value of the linear equation group at the current moment based on the output of the neural network model, the implementation method of obtaining the data that needs to be processed by the neural network model in the application and the first initial value of the linear equation group at the current moment can be: receiving a model call request from the application through the inference interface, and the model call request carries the input data and the first initial value.

[0116] In other words, when the application needs to solve the numerical solution of the linear equations at the current moment, the model call request carrying the input data and the first initial value can be sent to the model module through the inference interface to obtain a more accurate revised second initial value through the model module.

[0117] In addition, in the implementation of this application, before calling the model module through the inference interface, the application can also initialize some information, such as initializing the neural network model in the model module, to improve the execution speed of the subsequent model module. Based on this, in some embodiments, before receiving the model call request from the application through the inference interface, a model initialization request from the application can also be received through the initialization interface; the neural network model is loaded into the memory based on the model initialization request; and the address of the neural network model in the memory is sent to the application through the initialization interface. Accordingly, the model call request subsequently sent by the application also carries the address of the neural network model in the memory.

[0118] In other words, before sending a model call request carrying input data and a first initial value to the model module through the inference interface, the application first sends a model initialization request to the model module through the initialization interface to pre-load the neural network model into the memory, so that after sending the model call request, the initial value can be directly modified based on the neural network model in the memory.

[0119] In addition, in an embodiment of the present application, multiple neural network models for multiple scenarios can also be pre-trained, which will be referred to as multiple models later. In this scenario, during initialization, the model module can also first send multiple model identifiers to the application through the initialization interface, and the multiple model identifiers correspond one-to-one to the multiple models. Accordingly, before sending a model initialization request, the application subsequently selects the model identifier corresponding to the model currently to be used from the multiple model identifiers, that is, the target model identifier, and carries the target model identifier in the model initialization request sent. When the model module receives the model initialization request, it can select the neural network model to be used subsequently from the multiple models based on the target model identifier, and load the selected neural network model into the memory.

[0120] Optionally, in this scenario, the application may not specify a specific model during initialization. In this scenario, the model module directly loads multiple models into memory. At this time, when the application subsequently sends a model call request through the inference interface, it can carry the identifier of the model to be used later, that is, the target model identifier, in the model call request.

[0121] Step 602: Based on the input data, the estimated differential data at the current moment is output through the neural network model, the estimated differential data indicates the estimated deviation between the first initial value and the numerical solution to be solved of the linear equation group at the current moment, and the application is used to calculate the numerical solution of the linear equation group at the current moment based on the second initial value, and the second initial value is obtained by the estimated differential data and the first initial value.

[0122] After obtaining the input data, the input data can be input into the neural network model so that the neural network model outputs the estimated differential data at the current moment.

[0123] When the application calls the method of the embodiment of the present application through the inference interface, the model module needs to send the estimated differential data to the application through the inference interface when obtaining the estimated differential data. The application corrects the first initial value based on the estimated differential data to obtain the second initial value, and solves the numerical solution of the linear equations at the current moment through the iteration method based on the second initial value.

[0124] Optionally, in other embodiments, after obtaining the estimated differential data, the model module may further correct the first initial value based on the estimated differential data to obtain a second initial value of the linear equation system at the current moment, and send the second initial value to the application through the inference interface. The application solves the numerical solution of the linear equation system at the current moment through an iterative method based on the second initial value.

[0125] For example, when the estimated differential data is the value obtained by subtracting the numerical solution to be solved of the linear equation group at the current moment from the first initial value, the estimated differential data and the first initial value can be summed, and the summed result is the corrected second initial value.

[0126] In addition, after the application solves the numerical solution to the linear equations, the model module can also receive a memory release request from the application through the memory release interface. The memory release request carries the address of the neural network model in the memory; based on the memory release request, the neural network model is deleted from the memory to avoid excessive memory pressure.

[0127] Figure 7 This is a flow chart of a method for solving a numerical solution of a thread equation group based on an interface provided by an embodiment of the present application. Figure 7 As shown, during initialization, the application sends a model initialization request carrying the target model identifier through the initialization interface to instruct the model module to initialize the neural network model corresponding to the target model identifier to the memory, and returns the address of the initialized neural network model in the memory to the application through the initialization interface.

[0128] When solving the numerical solution of the linear equation system, the application sends input data through the inference interface. The input data is, for example, the actual differential data of a historical moment before the current moment and closest to the current moment (hereinafter referred to as the previous moment). The model module takes the actual differential data of the previous moment Input to the neural network model, the neural network model outputs the estimated differential data at the current moment And estimate the difference data The application sends the estimated differential data at the current moment to the application through the inference interface. Added to the first initial value, the first initial value is the numerical solution x of the thread equation group at the previous moment t-1 , the added value is used as the second initial value And based on the second initial value Find the numerical solution to a system of linear equations at the current time.

[0129] When the application no longer needs to call the model module, it can send a memory release request to the model module through the memory release interface. The memory release request carries the address of the neural network model in the memory to instruct the model module to delete the neural network model from the memory.

[0130] Figure 8 1 is another flow chart of the application of solving the numerical solution of the thread equations based on the interface provided by the embodiment of the present application. Figure 8 As shown, during initialization, the application sends a model initialization request carrying the target model identifier through the initialization interface to instruct the model module to initialize the neural network model corresponding to the target model identifier to the memory, and returns the address of the initialized neural network model in the memory to the application through the initialization interface.

[0131] When solving the numerical solution of the linear equation system, the application sends input data through the inference interface. The input data is, for example, the actual differential data of a historical moment before the current moment and closest to the current moment (hereinafter referred to as the previous moment). and the numerical solution x of the thread equations at the previous moment t 1 (as the first initial value). The model module takes the actual differential data of the previous moment Input to the neural network model, the neural network model outputs the estimated differential data at the current moment The model module takes the estimated differential data at the current moment Add the first initial value to the second initial value. And through the inference interface, the second initial value Sent to the application so that the application is based on the second initial value Find the numerical solution to a system of linear equations at the current time.

[0132] When the application no longer needs to call the model module, it can send a memory release request to the model module through the memory release interface. The memory release request carries the address of the neural network model in the memory to instruct the model module to delete the neural network model from the memory.

[0133] In order to further understand the method provided by the embodiment of the present application, the numerical weather forecasting business software (hereinafter referred to as weather forecasting software) in the meteorological field is used as an example for explanation. In the weather forecasting software, the parameters of the dynamic equation describing the meteorological system (i.e., the Helmholtz equation) are discretized to obtain the thread equation group Ax=b, where x represents the air pressure, which is a physical quantity with time continuity. The weather forecasting software sets the initial value of x and calculates the equation through the GCR solver to infer the air pressure at each geographical location at the current moment, and then forecasts the weather at the current moment.

[0134] In current weather forecast software, the process of solving large-scale sparse linear equations accounts for more than 30% of the overall computational effort, and as the resolution of the forecast results of the weather forecast software increases, the computational effort of solving the linear equations will increase. After the initial value is corrected using the method provided in the embodiment of the present application, the computational effort of solving the linear equations can be reduced, thereby improving the computational performance of the weather forecast software.

[0135] In addition, weather forecast software can use a distributed approach when forecasting global weather, that is, the world is divided into blocks according to longitude and latitude. For example, procID_x processes are set in the longitude direction and procID_y processes are set in the latitude direction, and the world is divided into procID_x*procID_y regions. A process is configured for each region to perform weather forecast related calculations separately. In addition, in order to reduce data communication between different processes, a neural network model for predicting and estimating differential data can be configured for each region. The neural network models in different regions can be the same, or a neural network model can be trained separately for each region.

[0136] When different neural network models are configured in different areas, it is necessary to bind the process and the neural network model so that any process can correct the initial value based on the neural network model corresponding to the corresponding area, and then solve the air pressure at each location point in the corresponding area at the current moment.

[0137] It should be noted that when different neural network models are configured in different regions, for any region, the training data and test data used to train the neural network model corresponding to the region also come from the region to improve the prediction accuracy of the trained neural network model.

[0138] Fig. 9 This is a correspondence between a neural network model, a region, and a process provided in an embodiment of the present application. Fig. 9 As shown, the area divided on the map includes Fig. 9The three areas shown by the three dotted squares are marked as area 1, area 2 and area 3. Among them, area 1 corresponds to neural network model 1, area 2 corresponds to neural network model 2, and area 3 corresponds to neural network model 3.

[0139] In the weather forecast software, a process is configured for each of area 1, area 2, and area 3, respectively, called process 1, process 2, and process 3, and process 1 is bound to neural network model 1, process 2 is bound to neural network model 2, and process 3 is bound to neural network model 3. Fig. 9 As shown, process 1 infers the current air pressure of each location point in area 1 based on neural network model 1. Process 2 infers the current air pressure of each location point in area 2 based on neural network model 2. Process 3 infers the current air pressure of each location point in area 3 based on neural network model 3.

[0140] The following is an explanation of the detailed process of the weather forecast software inferring the weather at the current moment. For example, the implementation process of the weather forecast software inferring the weather at the current moment is as follows:

[0141] Step 1: Collect the numerical solutions and initial values ​​of the linear equations of the weather forecast software at each historical moment in a continuous period of time, calculate the actual differential data at each moment, and determine the training data and test data based on the actual differential data. Among them, the sample data in the training data and test data are the actual differential data of the previous moment of a certain historical moment, and the label is the actual differential data of the historical moment.

[0142] Step 2: Design the structure of the neural network model to be trained, which is not limited to convolutional neural network (CNN), long short-term memory (LSTM) model, vision transformer (ViT) and other network structures and their variants. Use the training data in step 1 for training, and use the test data to verify the prediction accuracy of the trained neural network model, and select the neural network model with the highest prediction accuracy as the neural network model for subsequent prediction.

[0143] Step 3: Design interfaces such as initialization interface, inference interface, and memory release interface to complete the model module encapsulation to support the application to implement operations such as model initialization, model inference, and model memory release.

[0144] Step 4: According to the pre-set distributed strategy, complete the mapping relationship between the neural network model and the process. This mapping relationship means that during the model training phase, the area covered by the model training data must cover the area covered by the corresponding process. For example, the training data used to train a neural network model is from Fig. 9 , then the neural network model is bound to process 1, that is, a mapping relationship between the neural network model and process 1 is established. For another example, the training data used to train a neural network model is from Fig. 9 In this scenario, area 1 and area 2 share the same neural network model, so the neural network model is bound to process 1 and process 2, that is, a mapping relationship is established between the neural network model and process 1 and process 2 respectively.

[0145] Step 5: When the weather forecast software is initialized, it calls the initialization interface to instruct the model module to load the neural network model into the memory. For example, the neural network models corresponding to all processes can be loaded into the memory. Before calling the GCR solver, a process in the weather forecast software calls the inference interface to obtain the estimated differential data at the current moment, and corrects the initial value of the thread equation group based on the estimated differential data at the current moment. Based on the corrected initial value, it calculates by calling GCR to obtain the numerical solution of the thread equation group at the current moment.

[0146] Step 6: Before the weather forecast software ends, call the memory release interface to release the memory related to the neural network model.

[0147] In addition, the above is an example of the method of correcting the initial value provided by the application calling the embodiment of the present application. Optionally, in the implementation of the present application, after obtaining the second initial value, the model module 01 can also directly solve the numerical solution of the linear equations at the current moment based on the second initial value.

[0148] Fig.10 1 is a flow chart of determining the numerical solution of a linear equation system at the current moment provided by an embodiment of the present application. Fig.10 As shown, after the dynamic equations are converted into a linear equation system Ax = b, the numerical solution x of the thread equation system at the previous moment is first t-1 As the first initial value of the current moment, and then the actual differential data of the previous moment As the input data of the neural network model, so that the neural network model outputs the estimated differential data at the current moment According to the first initial value x t-1 The estimated difference data from the current moment Determine the second initial value Based on the second initial value Call the GCR solver to determine the numerical solution to the linear system of equations at the current time.

[0149] To summarize, in an embodiment of the present application, a neural network model is used to predict the deviation between the initial value of the linear equation group that needs to be calculated at the current moment and the numerical solution to be solved, that is, estimated differential data, so that the initial value at the current moment can be subsequently corrected based on the estimated differential data to obtain an initial value that is closer to the numerical solution, that is, an initial value with higher accuracy, so that the application accelerates the calculation process of solving the numerical solution of the linear equation group based on the initial value.

[0150] Fig.11 Schematic diagram of a device for processing data through a neural network model provided in an embodiment of the present application. Fig.11 As shown, the device 1100 includes the following modules.

[0151] The acquisition module 1101 is used to acquire data that needs to be processed by the neural network model in the application, and the data includes input data of the neural network model, and the input data indicates the actual deviation between the initial value and the numerical solution of the linear equation group that needs to be calculated before the current moment. For specific implementation methods, please refer to Figure 6 Step 601 in the embodiment.

[0152] Output module 1102 is used to output the estimated difference data at the current moment through the neural network model based on the input data, the estimated difference data indicates the estimated deviation between the first initial value of the linear equation system at the current moment and the numerical solution to be solved of the linear equation system at the current moment, and is used to calculate the numerical solution of the linear equation system at the current moment based on the second initial value, and the second initial value is obtained by the estimated difference data and the first initial value. For specific implementation methods, please refer to Figure 6 Step 602 in an embodiment.

[0153] Optionally, the input data includes N actual differential data corresponding to N historical moments before the current moment and closest to the current moment, N is a positive integer, and each of the N actual differential data indicates the actual deviation between the initial value and the numerical solution of the linear equations at the corresponding historical moment.

[0154] Optionally, the first initial value is related to a numerical solution of the linear equation system before the current moment.

[0155] Optionally, the first initial value is a numerical solution of the linear equation system at a historical moment before the current moment and closest to the current moment.

[0156] Optionally, the acquisition module is used to:

[0157] A model call request is received from the application through an inference interface, where the model call request carries input data;

[0158] The device also includes:

[0159] The first sending module is used to send the estimated differential data to the application through the inference interface. The application is also used to correct the first initial value based on the estimated differential data to obtain the second initial value.

[0160] Optionally, the acquisition module is used to:

[0161] Receiving a model call request from the application through an inference interface, where the model call request carries input data and a first initial value;

[0162] The device also includes:

[0163] A correction module, used for correcting the first initial value based on the estimated differential data to obtain a second initial value;

[0164] The second sending module is used to send a second initial value to the application through the inference interface.

[0165] Optionally, the device further comprises:

[0166] A first receiving module, configured to receive a model initialization request from the application through an initialization interface;

[0167] An initialization module, used to load the neural network model into memory based on a model initialization request;

[0168] A third sending module is used to send the address of the neural network model in the memory to the application through the initialization interface;

[0169] The model call request also carries the address of the neural network model in the memory.

[0170] Optionally, the device further comprises:

[0171] A second receiving module is used to receive a memory release request from the application through a memory release interface, where the memory release request carries an address of the neural network model in the memory;

[0172] The deletion module is used to delete the neural network model from the memory based on the memory release request.

[0173] Optionally, the neural network model is trained based on multiple training data and multiple test data;

[0174] Among them, each training data in the multiple training data and each test data in the multiple test data corresponds to a historical moment, and each includes a sample data and a label, the sample data indicates the actual deviation between the initial value and the numerical solution of the linear equation group before the corresponding historical moment, and the label is the actual differential data of the corresponding historical moment.

[0175] Optionally, the sample data includes N actual differential data corresponding one to one to N historical moments before the corresponding historical moment and closest to the corresponding historical moment.

[0176] In an embodiment of the present application, a neural network model is used to predict the deviation between the initial value of the linear equation group that needs to be calculated at the current moment and the numerical solution to be solved, that is, estimated differential data, so that the initial value at the current moment can be subsequently corrected based on the estimated differential data to obtain an initial value that is closer to the numerical solution, that is, an initial value with higher accuracy, thereby accelerating the calculation process of the numerical solution of the linear equation group based on the initial value.

[0177] It should be noted that: the device for processing data through a neural network model provided in the above embodiment only uses the division of the above functional modules as an example when processing data through a neural network model. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for processing data through a neural network model provided in the above embodiment and the method embodiment for processing data through a neural network model belong to the same concept. The specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0178] Fig.12 01 and the system 00 in the above embodiments can be realized by Fig.12 The computer device shown is implemented. Fig.12 The computer device includes at least one processor 1201 , a communication bus 1202 , a memory 1203 and at least one communication interface 1204 .

[0179] The processor 1201 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0180] The communication bus 1202 may include a pathway for transmitting information between the above-mentioned components.

[0181] The memory 1203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1203 may exist independently and be connected to the processor 1201 via the communication bus 1202. The memory 1203 may also be integrated with the processor 1201.

[0182] The memory 1203 is used to store the program code for executing the solution of the present application, and the execution is controlled by the processor 1201. The processor 1201 is used to execute the program code stored in the memory 1203. The program code may include one or more software modules. The model module 01 and the system 00 in the aforementioned embodiment can determine the data used to develop the application through the processor 1201 and one or more software modules in the program code in the memory 1203.

[0183] The communication interface 1204 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0184] In a specific implementation, as an embodiment, a computer device may include multiple processors, such as Fig.12 1 and 1205. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0185] In a specific implementation, as an embodiment, the computer device may further include an output device 1206 and an input device 1207. The output device 1206 communicates with the processor 1201 and may display information in a variety of ways. For example, the output device 1206 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 1207 communicates with the processor 1201 and may receive user input in a variety of ways. For example, the input device 1207 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0186] The above-mentioned computer device can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of computer device.

[0187] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0188] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0189] The above content is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.

Claims

1. A method for processing data by a neural network model, characterized in that: The method comprises: Acquire data that needs to be processed by the neural network model in the application, the data being input data of the neural network model, and the input data indicating an actual deviation between an initial value and a numerical solution of a linear equation group that needs to be calculated by the application before the current moment; Based on the input data, the estimated differential data at the current moment is output through the neural network model, and the estimated differential data indicates the estimated deviation between the first initial value of the linear equation group at the current moment and the numerical solution to be solved of the linear equation group at the current moment. The application is used to calculate the numerical solution of the linear equation group at the current moment based on the second initial value, and the second initial value is obtained by the estimated differential data and the first initial value.

2. The method according to claim 1, characterized in that The input data includes N actual differential data corresponding to N historical moments before the current moment and closest to the current moment, where N is a positive integer, and each of the N actual differential data indicates the actual deviation between the initial value and the numerical solution of the linear equation group at the corresponding historical moment.

3. The method according to claim 1 or 2, characterized in that The first initial value is a numerical solution of the linear equation group at a historical moment before the current moment and closest to the current moment.

4. The method according to any one of claims 1 to 3, characterized in that: The data that needs to be processed by the neural network model in the application is obtained, including: Receiving a model call request from the application through an inference interface, wherein the model call request carries the input data; After outputting estimated differential data at the current moment through the neural network model based on the input data, the method further includes: The estimated differential data is sent to the application through the inference interface, and the application is further used to correct the first initial value based on the estimated differential data to obtain the second initial value.

5. The method according to any one of claims 1 to 3, characterized in that: The data that needs to be processed by the neural network model in the application is obtained, including: Receiving a model call request from the application through an inference interface, wherein the model call request carries the input data and the first initial value; After outputting the estimated differential data at the current moment through the neural network model based on the input data, the method further includes: Based on the estimated differential data, the first initial value is corrected to obtain the second initial value; The second initial value is sent to the application through the inference interface.

6. The method according to any one of claims 1 to 5, characterized in that: The neural network model is trained based on multiple training data and multiple test data; Each training data in the multiple training data and each test data in the multiple test data corresponds to a historical moment, and each includes a sample data and a label, the sample data indicates the actual deviation between the initial value and the numerical solution of the linear equations before the corresponding historical moment, and the label is the actual differential data at the corresponding historical moment.

7. The method according to claim 6, characterized in that The sample data includes N actual differential data corresponding to N historical moments before the corresponding historical moment and closest to the corresponding historical moment.

8. A device for processing data through a neural network model, characterized in that The device comprises: An acquisition module, used for acquiring data that needs to be processed by the neural network model in the application, wherein the data is input data of the neural network model, and the input data indicates an actual deviation between an initial value and a numerical solution of a linear equation group that needs to be calculated by the application before a current moment; An output module is used to output the estimated differential data at the current moment through the neural network model based on the input data, the estimated differential data indicating the estimated deviation between the first initial value of the linear equation group at the current moment and the numerical solution to be solved of the linear equation group at the current moment, and the application is used to calculate the numerical solution of the linear equation group at the current moment based on the second initial value, and the second initial value is obtained by the estimated differential data and the first initial value.

9. The device according to claim 8, characterized in that The input data includes N actual differential data corresponding to N historical moments before the current moment and closest to the current moment, where N is a positive integer, and each of the N actual differential data indicates the actual deviation between the initial value and the numerical solution of the linear equation group at the corresponding historical moment.

10. The device according to claim 8 or 9, characterized in that The first initial value is a numerical solution of the linear equation group at a historical moment before the current moment and closest to the current moment.

11. The device according to any one of claims 8 to 10, characterized in that: The acquisition module is used for: Receiving a model call request from an application through an inference interface, wherein the model call request carries the input data; The device also includes: The first sending module is used to send the estimated differential data to the application through the inference interface, and the application is also used to correct the first initial value based on the estimated differential data to obtain the second initial value.

12. The device according to any one of claims 8 to 10, characterized in that: The acquisition module is used for: Receiving a model call request from an application through an inference interface, wherein the model call request carries the input data and the first initial value; The device also includes: A correction module, configured to correct the first initial value based on the estimated differential data to obtain the second initial value; A second sending module is used to send the second initial value to the application through the inference interface.

13. The device according to any one of claims 8 to 12, characterized in that: The neural network model is trained based on multiple training data and multiple test data; Each training data in the multiple training data and each test data in the multiple test data corresponds to a historical moment, and each includes a sample data and a label, the sample data indicates the actual deviation between the initial value and the numerical solution of the linear equations before the corresponding historical moment, and the label is the actual differential data at the corresponding historical moment.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 7.

15. A computer program product comprising instructions, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.