Neural network device, method and equipment
By deploying a fluid prediction model with adjustable time resolution in a neural network device, the problem of fixed time resolution of existing neural network models is solved, and efficient prediction that meets the time span needs of different users is achieved.
Patent Information
- Application Number
- CN202311528909.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-15
- Publication Date
- 2025-05-16
AI Technical Summary
After training, the time resolution of existing neural network models is fixed and cannot meet the different requirements of users for predicting time spans.
A neural network device is designed and a fluid prediction model is deployed, which includes a first spatial mapping operator, a time prediction operator and a second spatial mapping operator, providing an interface for configuring the time resolution so that it is adjustable.
Through the fluid prediction model with adjustable time resolution, users can meet different needs for the time span, improving user experience and predictive data acquisition efficiency.
Smart Images

Figure CN120012829A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a neural network device, method and equipment. Background Art
[0002] Many disciplines such as economics, social sciences, fluid mechanics, meteorology, etc. involve a type of time-related data, which is often called a time series. A time series is a collection of data arranged in chronological order.
[0003] In addition to considering the relationship between data and time, the analysis of time series also considers the relationship between data at different times. An important application of time series is time-based prediction. Time-based prediction refers to predicting the data that may be obtained in the future based on historical data. For example, in the field of meteorology, it is necessary to predict the meteorological data at a certain time in the future based on historical meteorological data.
[0004] Taking the meteorological field as an example, the time-based prediction process is explained: first, the basic neural network model is trained; after the neural network model training is completed, the meteorological data of a certain time that has been measured is input into the neural network model, and the neural network model analyzes the meteorological data and outputs the meteorological data of a certain time in the future. The meteorological data of a certain time in the future is the predicted data.
[0005] In actual applications, users may have different requirements for the time span of the forecast, that is, the interval between the time corresponding to the input weather data and the time corresponding to the forecasted data. For example, users may need to forecast weather data for the next day, week, or month.
[0006] However, after the training of the neural network model is completed, its time resolution (that is, the time span between the input data and the output data of the neural network model) is fixed and cannot meet the different requirements of users for the prediction time span. Summary of the invention
[0007] The embodiments of the present application provide a neural network device, method and apparatus for meeting different requirements of users for predicted time spans.
[0008] In a first aspect, an embodiment of the present application provides a neural network device, on which a fluid prediction model is deployed, the time resolution of the fluid prediction model is adjustable, and an interface for configuring the time resolution of the fluid prediction model is provided externally. Specifically, the fluid prediction model includes a first space mapping operator, a time prediction operator, and a second space mapping operator, and the functions of the three operators are as follows:
[0009] The first space mapping operator is used to receive the measurement data corresponding to the first time input into the fluid prediction model, and map the measurement data corresponding to the first time from the first data space to the second data space.
[0010] The time prediction operator provides an interface for configuring the time resolution of the fluid prediction model, and is used to iteratively process the measured data corresponding to the mapped first time according to the parameters received from the interface to obtain the prediction data corresponding to the second time.
[0011] The second space mapping operator is used to map the prediction data corresponding to the second time from the second data space to the first data space, and then output the prediction data corresponding to the second time.
[0012] Through the above device, a fluid prediction model with adjustable time resolution is deployed in the neural network device. The time resolution model is no longer fixed, but can be set to different values according to needs, which can meet the user's different needs for time span and effectively improve the user experience.
[0013] In a possible implementation, before deploying the fluid prediction model, the fluid prediction model needs to be pre-trained. In the embodiment of the present application, the fluid prediction model can be optimized using a gradient descent algorithm when training, wherein the loss function calculated in the optimization using the gradient descent algorithm indicates some or all of the following:
[0014] The sample data is processed by the first spatial mapping operator and the second spatial mapping operator in sequence, and the difference between the output data of the second spatial mapping operator and the sample data.
[0015] The difference between the output data of the sample data after being processed by the first space mapping operator, the time prediction operator, and the second space mapping operator and the real data.
[0016] Through the above device, the possible errors caused by the first space mapping operator and the second space mapping operator are taken into account during the training of the fluid prediction model, thereby ensuring that the trained fluid prediction model is more accurate.
[0017] In a possible implementation, the parameter received from the interface is a time resolution parameter, and the time resolution parameter is linearly related to the time resolution of the fluid prediction model. The relationship between the time resolution parameter and the time resolution of the fluid prediction model is relatively simple, so it is convenient to use the time resolution parameter to configure the time resolution of the fluid prediction model.
[0018] In one possible implementation, the product of the time resolution parameter and the basic time resolution of the fluid prediction model is equal to the time resolution of the fluid prediction model, and the basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model.
[0019] Through the above device, the time resolution of the fluid prediction model can be quickly obtained by calculating the product of the time resolution parameter and the basic time resolution of the fluid prediction model. The time resolution calculation method of the fluid prediction model is simple and efficient.
[0020] In a possible implementation, when the time prediction operator iteratively processes the measurement data corresponding to the mapped first time according to the parameter received from the interface, the measurement data corresponding to the mapped first time may be iterated r times, where r is equal to the time resolution parameter. The time prediction operator only needs to receive the time resolution parameter through the interface to determine the number of required iterations.
[0021] In a possible implementation, the parameter received from the interface is the time resolution of the fluid prediction model. The time resolution of the fluid prediction model can be directly received through the interface.
[0022] In one possible implementation, when the time prediction operator iteratively processes the measurement data corresponding to the first time after mapping according to the parameters received from the interface, it first determines the number of iterations r according to the parameters received from the interface. After determining the number of iterations r, iterates r times on the measurement data corresponding to the first time after mapping, where r is equal to the ratio of the time resolution to the basic time resolution of the fluid prediction model, and the basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model.
[0023] Through the above device, the time prediction operator can determine the number of required iterations according to the time resolution of the fluid prediction model, ensuring that after completing the determined number of iterations, the time resolution of the fluid prediction model is equal to the parameters received from the interface.
[0024] In a possible implementation, the time prediction operator can be regarded as a time series model running in the second data space, so the time prediction model also has a time resolution, wherein the basic time resolution of the fluid prediction model is equal to the time resolution of the time prediction operator.
[0025] In a possible implementation, the second data space is a time-linearly correlated space.
[0026] Through the above device, the relationship between data and time in the second data space is a relatively simple linear relationship, which facilitates the time prediction operator to process the measurement data corresponding to the first time mapped into the second data space and accurately output the corresponding prediction data.
[0027] In a possible implementation, the fluid prediction model can be applied to various scenarios that require predicting future data based on past data. For example, it can be applied to a weather prediction scenario, where the measured data describes the weather conditions at a first time, and the predicted data describes the weather conditions at a second time. For another example, it can be applied to a sales forecasting scenario, where the measured data describes the sales conditions at a first time, and the predicted data describes the sales conditions at a second time.
[0028] In a possible embodiment, the neural network device also includes a transmission module, which can obtain measurement data corresponding to the first time and the predicted time span provided by the user. The transmission module inputs parameters to the interface according to the predicted time span to configure the time resolution of the fluid prediction model to the predicted time span, and inputs the data corresponding to the first time into the fluid prediction model.
[0029] Through the above device, the transmission module can receive information provided by the user and input parameters to the interface to configure the time resolution of the fluid prediction model, so as to facilitate the normal operation of the subsequent fluid prediction model and output the prediction data corresponding to the second time.
[0030] In a possible implementation, the transmission module may obtain the prediction data corresponding to the second time, and transmit the prediction data corresponding to the second time to the user, so that the user can obtain the required prediction data in a timely manner.
[0031] In the second aspect, the embodiment of the present application further provides a model training method, which is used to train the fluid prediction model mentioned in the example of the first aspect above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The fluid prediction model includes a first spatial mapping operator, a time prediction operator, and a second spatial mapping operator, wherein the first spatial mapping operator and the second spatial mapping operator are used to implement spatial mapping, and the time prediction operator is used to iteratively process the input data and output prediction data. In the model training method, the gradient descent algorithm can be used to optimize the fluid prediction model training, wherein the loss function calculated in the optimization using the gradient descent algorithm indicates the following differences:
[0032] The sample data is processed by the first spatial mapping operator and the second spatial mapping operator in sequence, and the difference between the output data of the second spatial mapping operator and the sample data.
[0033] The difference between the data output by the second spatial mapping operator and the real data after the sample data is processed by the first spatial mapping operator, the time prediction operator, and the second spatial mapping operator.
[0034] In a possible implementation, when the gradient descent algorithm is used to optimize the fluid prediction model during training, the gradient descent algorithm is called to calculate the gradient of the loss function, and the weights in the fluid prediction model are adjusted according to the gradient.
[0035] In a possible implementation, before the time prediction operator uses the gradient descent algorithm to optimize the fluid prediction model during training, the time resolution of the fluid prediction model is configured as a set value through an interface.
[0036] In a possible implementation, when the time resolution of the fluid prediction model is configured as a set value through an interface, a time resolution parameter may be input into the slave interface, and the time resolution parameter is linearly related to the set value.
[0037] In a possible implementation, the product of the time resolution parameter and the basic time resolution of the fluid prediction model is equal to a set value, and the basic time resolution of the fluid prediction model is the minimum time span between input data of the fluid prediction model and output data of the fluid prediction model.
[0038] In a possible implementation, the time resolution parameter is the number of iterations when the time prediction operator iteratively processes the input data.
[0039] In a third aspect, the embodiment of the present application further provides a time-based prediction method, which is performed by the neural network device provided in the example of the first aspect above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. In this method:
[0040] The neural network device obtains the measurement data corresponding to the first time provided by the user and the predicted time span.
[0041] The neural network device configures the time resolution of the fluid prediction model through an interface according to the prediction time span, and inputs the measurement data corresponding to the first time into the fluid prediction model, wherein the time resolution of the fluid prediction model is equal to the prediction time span.
[0042] The neural network device obtains the prediction data corresponding to the second time output by the fluid prediction model, and feeds back the prediction data corresponding to the second time to the user, wherein the first time and the second time satisfy the prediction time span.
[0043] In a possible implementation, when the fluid prediction model outputs the prediction data corresponding to the second time, the data processing process inside the fluid prediction model is as follows:
[0044] The first space mapping operator in the fluid prediction model maps the measurement data corresponding to the first time from the first data space to the second data space.
[0045] The time prediction operator in the fluid prediction model provides an interface for configuring the time resolution of the fluid prediction model. The time prediction operator in the fluid prediction model iteratively processes the measured data corresponding to the mapped first time according to the parameters received from the interface to obtain the predicted data corresponding to the second time.
[0046] The second space mapping operator in the fluid prediction model maps the prediction data corresponding to the second time from the second data space to the first data space, and outputs the prediction data corresponding to the second time.
[0047] In a possible implementation, the parameter received from the interface is a time resolution parameter, and the time resolution parameter is linearly related to the time resolution of the fluid prediction model.
[0048] In one possible implementation, the product of the time resolution parameter and the basic time resolution of the fluid prediction model is equal to the time resolution of the fluid prediction model, and the basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model.
[0049] In a possible implementation, when the time prediction operator iteratively processes the data corresponding to the first time after mapping according to the parameters received from the interface, the time prediction operator iterates the data corresponding to the first time after mapping r times, where r is equal to the time resolution parameter.
[0050] In a fourth aspect, the present application further provides a computing device, the computing device includes a processor and a memory, and may also include a communication interface, the processor executes program instructions in the memory to execute the method provided by any possible implementation of the second aspect or any possible implementation of the third aspect. The memory is coupled to the processor, which stores the necessary computer program instructions and data in the model training or time-based prediction process. The communication interface is used to communicate with other devices, such as obtaining the prediction data corresponding to the first time and the prediction time span, sending the prediction data corresponding to the second time, etc.
[0051] In a fifth aspect, the present application provides a computing device system, which includes at least one computing device. Each computing device includes a memory and a processor. The processor of at least one computing device is used to access the code in the memory to execute the method provided by any possible implementation of the second aspect or any possible implementation of the third aspect.
[0052] In a sixth aspect, the present application provides a non-transient readable storage medium. When the non-transient readable storage medium is executed by a computing device, the computing device executes the method provided by any possible implementation of the second aspect or any possible implementation of the third aspect. The storage medium stores a program. The storage medium includes but is not limited to a volatile memory, such as a random access memory, a non-volatile memory, such as a flash memory, a hard disk drive (HDD), and a solid state drive (SSD).
[0053] In a seventh aspect, the present application provides a computing device program product, the computing device program product includes computer instructions, and when executed by the computing device, the computing device executes the method provided by any possible implementation of the second aspect or any possible implementation of the third aspect. The computer program product can be a software installation package, and when it is necessary to use the method provided by any possible implementation of the second aspect or any possible implementation of the third aspect, the computer program product can be downloaded and executed on the computing device. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of the architecture of a data prediction system provided in this application;
[0055] Figure 2 A schematic diagram of the structure of a fluid prediction model provided in this application;
[0056] Figure 3 A schematic diagram of a model training method provided for this application;
[0057] Figure 4 A schematic diagram of the data processing process of a fluid prediction model in a training process provided by the present application;
[0058] Figure 5 A schematic diagram of a time-based prediction method provided for this application;
[0059] Figure 6 A schematic diagram of a data input interface provided for this application;
[0060] Figure 7 A schematic diagram of a data display interface provided for this application;
[0061] Figure 8 A schematic diagram of the structure of a neural network device provided in this application;
[0062] Figure 9-10 A schematic diagram of the structure of a computing device provided in this application. DETAILED DESCRIPTION
[0063] Before describing the time-based prediction method provided in the embodiment of the present application, some concepts involved in the embodiment of the present application are first explained.
[0064] (1) Time series model.
[0065] Time series refers to a collection of data arranged in chronological order. Time series appear in many disciplines. For example, in meteorology, it is necessary to record meteorological data such as temperature, air humidity, air pressure, precipitation, wind speed, etc. of a certain area at different times in order to analyze the changing trends of temperature, air humidity, air pressure, precipitation, wind speed, etc. For another example, in economics, it is necessary to record data such as sales, publicity expenses, product quantity, and product unit price for each month in order to analyze the relationship between sales, publicity expenses, product quantity, and product unit price.
[0066] Time series models are a type of neural network model used to analyze time series. Time series models can predict future data based on past data. Time series models can learn the changing trends or patterns of data from historical time series and predict future data based on these changing trends or patterns.
[0067] Common time series models include autoregressive model (AR), moving average model (MA), and autoregressive integrated moving average model (ARIMA).
[0068] In an embodiment of the present application, a new time series model is provided. In order to distinguish it from the existing time series model, the new time series model provided in the embodiment of the present application is called a fluid prediction model. In an embodiment of the present application, a spatial mapping operator (such as a first spatial mapping operator and a second spatial mapping operator) for realizing spatial mapping is added to the fluid prediction model to ensure that when the fluid prediction model learns the input data, it can learn in a time-linearly related space that can fully reflect the relationship between data and time, and then output prediction data that is more in line with the actual situation. The structure of the fluid prediction model provided in the embodiment of the present application and the training process of the fluid prediction model will be introduced below.
[0069] It is worth noting that although the new time series model is named "fluid prediction model" in the embodiment of the present application, it does not mean that the fluid prediction model is only applicable to the fluid field. Any field that needs to analyze and predict time series data can use the fluid prediction model provided by the embodiment of the present application for analysis and prediction.
[0070] (2) Space mapping operators and time linearly related spaces.
[0071] The spatial mapping operator can establish a mapping relationship between two data spaces and can map data in one data space to another data space; the spatial mapping operator can convert data A in one data space into data B in another data space, and data B can be regarded as the representation of data A in another data space.
[0072] The time series model provided in the embodiment of the present application includes two space mapping operators. For the convenience of distinction, the two space mapping operators are respectively referred to as the first space mapping operator and the second space mapping operator. Among them, the first space mapping operator is used to map data from the first data space to the second data space, and the second space mapping operator is used to map data from the second data space to the first data space. The first space mapping operator and the second space mapping operator are "inverse" operators of each other.
[0073] In the process of training the time series model, the first spatial mapping operator is trained to enable the first spatial mapping operator to have the ability to map data to a time-linearly related space. The second spatial mapping operator is trained to enable the second spatial mapping operator to have the ability to map data from a time-linearly related space to the space to which the data originally belongs (i.e., the first data space).
[0074] The distribution of variables in a time-linearly correlated space over time is linearly correlated. In the embodiment of the present application, the variable is a variable represented by measurement data, prediction data or sample data. The measurement data, prediction data or sample data is the specific value of the variable.
[0075] To put it another way, in the time-linearly correlated space, we can always find the linear relationship between the variable and time. The time-linearly correlated space refers to the data space that covers the linear relationship between the variable and time.
[0076] (3), prediction time span, time resolution, time resolution parameter, and time prediction operator.
[0077] Since the data involved in the embodiments of the present application (such as measurement data, prediction data, sample data) are all time-related data, that is, there is a corresponding relationship between data and time in the embodiments of the present application.
[0078] Taking the measurement data corresponding to the first time as an example, the measurement data corresponding to the first time can be understood as the measurement data valid at the first time, or the measurement data applicable at the first time. Applied to actual scenarios, such as in the meteorological field, the measurement data corresponding to the first time can be the meteorological data at the first time, describing the meteorological status at the first time; for example, when applied to the sales statistics scenario, the measurement data corresponding to the first time can be the sales at the first time.
[0079] Taking the forecast data corresponding to the second time as an example, the forecast data corresponding to the second time can be understood as the forecasted data valid within the second time, or the forecasted data applicable to the second time. Applied to actual scenarios, such as in the meteorological field, the forecast data corresponding to the second time can be the forecasted meteorological data at the second time, describing the forecasted meteorological state at the second time; for another example, when applied to the sales statistics scenario, the forecast data corresponding to the second time can be the forecasted sales at the second time.
[0080] The prediction time span describes the time span between the measurement data provided by the user and the prediction data that the user needs to obtain, that is, the time span between the first time and the second time.
[0081] Time resolution is an important parameter of a time series model (such as the fluid prediction model provided in the embodiment of the present application). The time resolution describes the time span between the input data and the output data of the time series model, that is, it describes the time span between the time corresponding to the input data and the time corresponding to the output data (which can also be understood as the time interval).
[0082] The time resolution of the fluid prediction model provided in the embodiment of the present application is adjustable, that is, it allows the time span between the input data and the output data of the fluid prediction model to be adjusted.
[0083] In the embodiment of the present application, the fluid prediction model provides an interface for configuring the time resolution, through which the time resolution of the fluid prediction model can be configured.
[0084] The embodiment of the present application does not limit the specific presentation method of the interface. For example, the interface can be presented as an interface for directly inputting the time resolution, that is, the parameter input by the interface is the time resolution of the fluid prediction model. For another example, the interface can also be presented as an interface for inputting parameters related to the time resolution, that is, the parameter input by the interface is not the time resolution of the fluid prediction model, but a parameter related to the time resolution. For the convenience of explanation, the parameter related to the time resolution is referred to as the time resolution parameter.
[0085] The specific value of the time resolution parameter determines the time resolution of the fluid prediction model. The time resolution of the fluid prediction model is linearly related to the time resolution parameter, and the linear relationship is pre-configured. For example, the time resolution of the fluid prediction model can be equal to the product of the basic time resolution of the fluid prediction model and the time resolution parameter, wherein the basic time resolution of the fluid prediction model is a constant, which is a unique attribute of the fluid prediction model. The basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model, that is, the minimum time interval between the time corresponding to the input data of the fluid prediction model and the time corresponding to the output data of the fluid prediction model.
[0086] In addition to the space mapping operator, the fluid prediction model in the embodiment of the present application also includes a time prediction operator, which is the main component of the fluid prediction model. The time prediction operator has a prediction function and can output prediction data based on the input measurement data. The input data and output data of the time prediction operator are both data in the second data space, so the time prediction operator can be understood as a "time series model" applicable to the second data space. The time prediction operator also has a time resolution, and the time resolution of the time prediction operator is equal to the basic time resolution of the fluid prediction model provided in the embodiment of the present application.
[0087] like Figure 1 , which is a schematic diagram of the architecture of a data prediction system provided in an embodiment of the present application, wherein the data prediction system includes a neural network device 100 and a client 200 .
[0088] The client 200 can be deployed at a location close to the user side. As the "front end" of the data prediction system, the client 200 faces the user, receives data provided by the user or instructions triggered by the user, and can also display or transmit data to the user. In an embodiment of the present application, the client 200 can obtain the measurement data corresponding to the first time and the prediction time span provided by the user, and initiate a prediction request to the neural network device 100 under the trigger of the user. The prediction request is used to request a prediction based on the measurement data corresponding to the first time. The prediction request carries the measurement data corresponding to the first time and the prediction time span provided by the user. In addition, the client 200 can also receive the prediction data corresponding to the second time from the neural network device 100, and display or transmit the prediction data corresponding to the second time to the user.
[0089] The specific form of the client 200 is not limited in the embodiments of the present application. For example, the client 200 can be a client program running on a computing device, such as a browser, or a front-end application dedicated to prediction. The client 200 can also be a physical device, such as a computing device deployed on the user side, a mobile terminal, etc.
[0090] The neural network device 100 can process the prediction request initiated by the client 200, make a prediction based on the measurement data corresponding to the first time, and obtain the prediction data corresponding to the second time. The neural network device is deployed with a fluid prediction model. The fluid prediction model has a prediction function and can output predicted data based on input data.
[0091] In an embodiment of the present application, after receiving a prediction request from a client 200, the neural network device 100 obtains the measurement data corresponding to the first time and the prediction time span, configures the time resolution of the fluid prediction model according to the prediction time span, the time resolution of the configured fluid prediction model is equal to the prediction time span, inputs the measurement data corresponding to the first time into the fluid prediction model, obtains the prediction data corresponding to the second time output by the fluid prediction model, and transmits the prediction data to the client 200.
[0092] The fluid prediction model deployed on the neural network device 100 may be obtained by pre-training the fluid prediction model by the neural network device 100, or may be deployed on the neural network device 100 by other devices after training the fluid prediction model. The embodiment of the present application does not limit the device for training the fluid prediction model.
[0093] The neural network device 100 can be a hardware device, such as a server, a terminal computing device, etc., or a software device, specifically a set of software systems running on a computing device. The embodiment of the present application does not limit the location where the neural network device 100 is deployed. Exemplarily, the neural network device 100 can run on a cloud computing device system (including at least one cloud computing device, such as a server, etc.), can also run on an edge computing device system (including at least one edge computing device, such as a server, a desktop computer, etc.), and can also run on various terminal computing devices, such as laptops, personal desktop computers, etc.
[0094] In such Figure 1In the data prediction system shown, the neural network device 100 interacts with the user through the client 200, obtains the measurement data corresponding to the first time and the predicted time span provided by the user, and transmits or displays the predicted data corresponding to the second time to the user. In practical applications, the neural network device 100 can also be deployed on the user side to interact directly with the user. In the embodiment of the present application, only the interaction between the neural network device 100 and the user through the client 200 is used as an example for explanation.
[0095] In the application embodiment, the fluid prediction model deployed on the neural network device 100 provides an interface for configuring the time resolution, allowing the neural network device 100 to configure the time resolution for the fluid prediction model. The fluid prediction model deployed on the neural network device 100 is a fluid prediction model with adjustable time resolution. The user can provide the measurement data corresponding to the first time and the prediction time span according to their own needs. The neural network device 100 can configure the time resolution of the fluid prediction model based on the prediction time span. After configuring the time resolution of the fluid prediction model, it is only necessary to input the measurement data corresponding to the first time into the fluid prediction model, and the fluid prediction model can output the prediction data corresponding to the second time. The prediction time span required by the user is no longer limited by the time resolution of the fluid prediction model, which improves the user experience and ensures the efficiency of obtaining prediction data.
[0096] The structure of a fluid prediction model provided in an embodiment of the present application and the training process of the fluid prediction model are described below.
[0097] Structure of the fluid prediction model:
[0098] like Figure 2 , which is a schematic diagram of the structure of a fluid prediction model provided in an embodiment of the present application, the fluid prediction model includes a first space mapping operator, a time prediction operator, and a second space mapping operator. The first space mapping operator, the time prediction operator, and the second space mapping operator are connected at the end.
[0099] The first space mapping operator is used to map data input to the first space mapping operator (such as measurement data corresponding to the first time) from the first data space to the second data space.
[0100] The time prediction operator is used to perform iterative processing based on the data output by the first space mapping operator, and output prediction data.
[0101] The second space mapping operator is used to map the prediction data output by the time prediction operator from the second data space to the first data space.
[0102] In the embodiment of the present application, the first data space refers to the data space to which the measured data corresponding to the first time provided by the user and the predicted data corresponding to the second time required by the user belong. The second data space is the data space in which the time prediction operator runs, that is, the data space to which the input data and output data of the time prediction operator belong.
[0103] The time prediction operator can actually be regarded as a "time series model" running in the second data space, and the time resolution of the time prediction operator is the basic time resolution of the fluid prediction model. "Iterative processing" refers to a cyclic processing process of data. In this iterative processing process, the time prediction operator can run multiple times (that is, iterate multiple times). During each run, the output data of the time prediction operator in the last run is used as the input data for this run. The number of times the time prediction operator runs is the number of iterations in the iterative processing process. Among them, the time prediction operator runs once can be regarded as a special "iterative processing", that is, the number of iterations in the iterative processing process is one. It can be seen that the number of iterations of the time prediction operator determines the time resolution of the fluid prediction model, and the time resolution of the fluid prediction model is equal to the product of the number of iterations of the time prediction operator and the basic time resolution of the fluid prediction model.
[0104] Within the fluid prediction model, the fluid prediction model provides an interface for configuring time resolution, which is essentially an interface provided by the time prediction operator to configure time resolution. Configuring the time resolution for the fluid prediction model through this interface is essentially configuring the number of iterations of the time prediction operator through this interface.
[0105] When the interface is expressed as an interface for directly inputting the time resolution, the fluid prediction model needs to convert the parameters input by the interface into the number of iterations of the time prediction operator, that is, the number of iterations of the time prediction operator is equal to the ratio of the parameters input by the interface to the time resolution of the time prediction operator (that is, the basic time resolution of the fluid prediction model).
[0106] When the interface is expressed as an interface for inputting time resolution related parameters, the fluid prediction model needs to convert the parameters input by the interface into the number of iterations of the time prediction operator. According to the linear relationship between the time resolution and the time resolution parameter of the fluid prediction model, the time resolution parameter is converted into the time resolution of the fluid prediction model, and then the number of iterations of the time prediction operator is determined according to the time resolution of the fluid prediction model. Among them, the number of iterations of the time prediction operator is equal to the ratio of the parameters input by the interface to the time resolution of the time prediction operator (that is, the basic time resolution of the fluid prediction model). Exemplarily, when the time resolution of the fluid prediction model can be equal to the product of the basic time resolution of the fluid prediction model and the time resolution parameter, the time resolution parameter is equal to the number of iterations of the time prediction operator, that is, the value input by the interface is the number of iterations of the time prediction operator.
[0107] As a time series model, the data processed by the fluid prediction model is related to time. In the process of processing the input data, the fluid prediction model also needs to analyze the relationship between data and time. Therefore, the clearer or more specific the relationship between data and time is, the more conducive it is for the fluid prediction model to analyze the relationship between data and time, and the accuracy of the fluid prediction model can be effectively guaranteed. It can be seen that in the data space, the simpler the relationship between data and time is, the more accurate the fluid prediction model can be guaranteed. For a fluid prediction model that has been trained, the second data space can be a space that is linearly related to time or a data space that is close to a space that is linearly related to time. In the second data space, data and time can present a relatively simple linear relationship. In such a data space, the relationship between data and time can be more accurately reflected, and then the data within a certain time in the future can be efficiently predicted. In the fluid prediction model provided in the embodiment of the present application, a first space mapping operator and a second space mapping operator are added to ensure that the time prediction operator that bears the main prediction function in the fluid prediction model runs in the second data space, so that the time prediction operator can accurately output the predicted data corresponding to the second time.
[0108] In the embodiment of the present application, the internal structure of the first space mapping operator, the time prediction operator, and the second space mapping operator is not limited. For example, the first space mapping operator and the second space mapping operator can adopt a multilayer perceptron (MLP) structure, and the time prediction operator can adopt a convolution structure, a fully connected structure, a transformer structure, or one or more thereof. The transformer structure is a structure of a graph neural network (GNN). Any neural network model that can realize the corresponding function can be used as the first space mapping operator, the time prediction operator, and the second space mapping operator.
[0109] From the structural description of the fluid prediction model, it can be seen that the three main operators in the fluid prediction model (i.e., the first space mapping operator, the time prediction operator, and the second space mapping operator) have corresponding functions. The fluid prediction model needs to be trained to ensure that the three main operators in the fluid prediction model have corresponding functions.
[0110] Training of the fluid prediction model:
[0111] The following is an explanation of the training process of the fluid prediction model. In the embodiment of the present application, the gradient descent algorithm can be used to optimize the training process of the fluid prediction model. Figure 3 As shown, a training process of a fluid prediction model provided in an embodiment of the present application is provided.
[0112] Step 300: Configure the time resolution of the fluid prediction model. For example, the time resolution of the fluid prediction model can be configured as the basic time resolution or a set value of the fluid prediction model, or the time resolution of the fluid prediction model can be configured as the product of the basic time resolution of the fluid prediction model and a certain value.
[0113] When executing step 300, the time resolution of the configured fluid prediction model is the time resolution used by the fluid prediction model during the training process, which can also be understood as the time resolution that the fluid prediction model is expected to have during the training process. Therefore, step 300 can be understood as the fluid prediction model assuming a time resolution value, and when executing step 300, the number of iterations of the time prediction operator in the fluid prediction model can be determined. When training the fluid prediction model, the time resolution of the time prediction operator is uncertain and is an unknown number. It is a parameter that can only be determined through training. By training the fluid prediction model, it can be ensured that the time resolution of the time prediction operator or the basic time resolution of the fluid prediction model is equal to the ratio of the time resolution of the fluid prediction model configured in step 300 to the number of iterations of the time prediction operator in the fluid prediction model.
[0114] Assuming that the interface provided by the fluid prediction model for configuring and adjusting the time resolution is an interface for inputting a time resolution parameter, and the time resolution parameter is the number of iterations of the time prediction operator, when executing step 300, the time resolution parameter can be input in the interface to configure the time resolution of the fluid prediction model, and the time resolution of the configured fluid prediction model is equal to the product of the time resolution parameter and the basic time resolution of the fluid prediction model. During the entire training process, the time resolution of the fluid prediction model can remain unchanged.
[0115] Step 301: Prepare a training set of a fluid prediction model, which includes multiple sample data, each sample data is a measurement data corresponding to a certain time. The time corresponding to each sample data is different. A data label is set on each sample data, and the data label records the real data. The time span between the real data and the sample data is equal to the time resolution of the fluid prediction model, that is, the time interval between the time corresponding to the real data and the data corresponding to the sample data is equal to the time resolution of the fluid prediction model (that is, the time resolution of the fluid prediction model configured in step 300).
[0116] Step 302: Input the sample data in the training set into the fluid prediction model to obtain the prediction data output by the fluid prediction model, as well as the data output by the sample data after it passes through the first spatial mapping operator and the second spatial mapping operator in the fluid prediction model in sequence. For the sake of convenience, the data output by the second spatial mapping operator after the sample data passes through the first spatial mapping operator and the second spatial mapping operator in the fluid prediction model in sequence is called reference sample data.
[0117] like Figure 4 As shown, for any sample data in the training set, the sample data has the following two processing processes in the fluid prediction model.
[0118] Processing process 1: The sample data is input into the first spatial mapping operator, and is processed by the first spatial mapping operator, the time prediction operator, and the second spatial mapping operator. In this processing process, the data output by the second spatial mapping operator is the prediction data.
[0119] Processing process 1 is the normal processing process of data in the fluid prediction model. After the sample data is input into the first space mapping operator, the first space mapping operator maps the sample data from the first data space to another data space. Since this is a training process, the other data space here is not necessarily the second data space, that is, it is not a space that is linearly related in time or a data space that is close to a space that is linearly related in time. Only after the training process, the other data space gradually becomes the second data space. For the convenience of explanation, the other data space involved in the training process is called the third data space. After the training process, the third data space gradually approaches the second data space and eventually becomes the second data space.
[0120] The sample data is mapped to the third data space by the first space mapping operator, and the time prediction operator obtains the sample data mapped to the third data space, and the time prediction operator is iterated. If the time resolution parameter is N, then the number of iterations of the time prediction operator is N. After iterating N times, the time prediction operator outputs the predicted data in the third data space.
[0121] The second space mapping operator obtains the prediction data in the third data space output by the time prediction operator, maps the prediction data in the third data space to the first data space, and outputs the final prediction data.
[0122] Processing process 2: The sample data is input into the first space mapping operator and processed by the first space mapping operator and the second space mapping operator. In this processing process, the data output by the second space mapping operator is the reference sample data.
[0123] Processing process 2 does not involve data prediction, but only maps sample data from the first data space to the third data space, and then maps it from the third data space to the first data space. Theoretically, the data output after the sample data is mapped from the first data space to the third data space, and then from the third data space to the first data space should be sample data. However, since errors may exist in the spatial mapping process of the first spatial mapping operator and the second spatial mapping operator, the data output by the second spatial mapping operator may be inconsistent with the sample data. Therefore, the data output by the second spatial mapping operator is referred to as reference sample data.
[0124] Step 303: Calculate the loss function based on the prediction data output by the fluid prediction model and the reference sample data output after the sample data passes through the first spatial mapping operator and the second spatial mapping operator in the fluid prediction model in sequence.
[0125] One goal of training the fluid prediction model is to make the predicted data output by the second space mapping operator close to or equal to the real data, that is, to reduce the difference between the predicted data and the real data.
[0126] Since the fluid prediction model adds a first spatial mapping operator and a second spatial mapping operator, in an embodiment of the present application, another goal of training is to reduce possible errors in the spatial mapping process of the first spatial mapping operator and the second spatial mapping operator, that is, to reduce the difference between the reference sample data and the sample data.
[0127] When calculating the loss function, the loss function may indicate at least some or all of the following:
[0128] The difference between the output data of the second spatial mapping operator and the sample data after the sample data is processed by the first spatial mapping operator and the second spatial mapping operator in sequence. For the convenience of explanation, this part of the difference is called reconstruction loss.
[0129] The difference between the predicted data output by the time prediction operator after being processed by the second spatial mapping operator and the real data is referred to as the prediction loss for the convenience of explanation.
[0130] For example, the loss function F can be specified as:
[0131] F=|XX`|+|YY`|
[0132] Among them, X is the sample data, X' is the reference sample data, Y is the predicted data, and Y' is the real data.
[0133] The embodiments of the present application do not limit the calculation method of the loss function. Any calculation method of the loss function that can characterize the reconstruction loss and / or prediction loss is applicable to the embodiments of the present application.
[0134] Step 304: Call the gradient descent algorithm to calculate the gradient according to the loss function, and adjust the weights in the fluid prediction model based on the gradient.
[0135] Gradient descent is an optimization algorithm, also known as the steepest descent method. To find the local minimum of the loss function, the weights in the fluid prediction model are adjusted in the opposite direction of the gradient (or approximate gradient) corresponding to the current point on the loss function with a specified step size.
[0136] Each time a sample data is input into the fluid prediction model, the weights in the fluid prediction model can be adjusted using the gradient descent algorithm until the calculated loss function converges and the training process is completed.
[0137] It can be seen from the above training process that in the process of training the fluid prediction model, the time resolution of the fluid prediction model is preconfigured, that is, the training of the fluid prediction model is completed when the time resolution of the fluid prediction model is fixed. After the training of the fluid prediction model is completed, the fluid prediction model is a time series model that allows the time resolution to be adjusted. In other words, in the entire training process, there is no need to consider training time series models with different time resolutions, and only the fluid prediction model with the preconfigured time resolution needs to be trained.
[0138] The process of using the fluid prediction model to make predictions based on time:
[0139] After the fluid prediction model is trained, the fluid prediction model can deploy a neural network device to process the measurement data provided by the user and make predictions based on the measurement data. The following describes the process of the neural network device making predictions on the measurement data provided by the user.
[0140] As Figure 1 Take the system architecture shown in the figure as an example. Figure 5 As shown, a time-based prediction method provided by an embodiment of the present application includes:
[0141] Step 501: The client 200 initiates a prediction request to the neural network device 100. The prediction request carries the measurement data corresponding to the first time and the prediction time span provided by the user. The prediction request is used to request a prediction based on the measurement data corresponding to the first time.
[0142] The user may interact with the client 200 deployed on the user side and provide the measurement data corresponding to the first time and the predicted time span. The embodiment of the present application does not limit the manner in which the user provides the client 200 with the measurement data corresponding to the first time and the predicted time span.
[0143] For example, the client 200 may provide a visual data input interface for the user, such as Figure 6 As shown, it is a schematic diagram of a visual data input interface provided by the client 200 to the user. In the data input interface, an upload option of the measurement data corresponding to the first time and a typing box for the predicted time span are provided.
[0144] In the data input interface, the user can upload the measurement data corresponding to the first time to the client 200 and input the predicted time span according to his / her own needs.
[0145] After detecting the user's operation on the data input interface, the client 200 obtains the measurement data corresponding to the first time and the predicted time span, and generates a prediction request carrying the measurement data corresponding to the first time and the predicted time span.
[0146] Step 502: After receiving the prediction request, the neural network device 100 obtains the measurement data corresponding to the first time and the prediction time span.
[0147] Step 503: The neural network device 100 configures a time resolution for the fluid prediction model according to the prediction time span, and inputs the measurement data corresponding to the first time into the fluid prediction model.
[0148] The fluid prediction model provides an interface for configuring the time resolution. The neural network device 100 can call the interface and input parameters to the interface according to the prediction time span to configure the time resolution for the fluid prediction model. The time resolution of the fluid prediction model is the prediction time span.
[0149] For example, assuming that the interface is an interface for inputting time resolution, the neural network device 100 can input the prediction time span into the interface, then the time resolution of the fluid prediction model is the prediction time span.
[0150] For another example, assuming that the interface is an interface for inputting a time resolution parameter, the input time resolution parameter is the number of iterations of the time prediction operator in the fluid prediction model. The neural network device 100 calculates the ratio of the prediction time span to the basic time resolution of the fluid prediction model, which is the number of iterations of the prediction operator when the time resolution of the fluid prediction model is equal to the prediction time span. The neural network device 100 can input the ratio into the interface.
[0151] After configuring the time resolution of the fluid prediction model, the neural network device 100 inputs the measurement data corresponding to the first time into the fluid prediction model. The fluid prediction model analyzes the measurement data and outputs the prediction data corresponding to the second time, wherein the measurement data corresponding to the first time and the prediction data corresponding to the second time satisfy the prediction time span.
[0152] In the fluid prediction model, after the measurement data corresponding to the first time is input into the first space mapping operator, the first space mapping operator maps the sample data from the first data space to the second data space.
[0153] The measurement data corresponding to the first time is mapped to the second data space through the first space mapping operator, and the time prediction operator obtains the measurement data corresponding to the first time mapped to the second data space, and iterates the time prediction operator. If the prediction time span is T, then the number of iterations of the time prediction operator is r = T / D, where D is the time resolution of the time prediction operator. After the time prediction operator iterates r times, the time prediction operator outputs the predicted data corresponding to the second time in the second data space.
[0154] The second space mapping operator obtains the prediction data corresponding to the second time in the second data space output by the time prediction operator, maps the prediction data corresponding to the second time in the second data space to the first data space, and outputs the prediction data corresponding to the second time.
[0155] Step 504: The neural network device 100 obtains the prediction data corresponding to the second time output by the fluid prediction model, and feeds back the prediction data corresponding to the second time to the user through the client 200.
[0156] The neural network device 100 may transmit the prediction data corresponding to the second time to the client 200. After receiving the prediction data corresponding to the second time, the client 200 may display the prediction data corresponding to the second time to the user.
[0157] For example, the client 200 can provide a visual data display interface for the user, such as Figure 7 As shown, it is a schematic diagram of a visual data display interface provided by the client 200 to the user, in which a download option of the predicted data corresponding to the second time and a preview box of the predicted data are provided.
[0158] In the data display interface, the user can view the predicted data in the preview box and can also download the predicted data corresponding to the second time by clicking the download option.
[0159] Based on the same inventive concept as the method embodiment, the present application embodiment also provides a neural network device, which is used to execute the method executed by the neural network device 100 in the above method embodiment. Figure 8 As shown, the neural network device 800 includes a transmission module 802 and a fluid prediction model 801. Specifically, in the neural network device 800, each module is connected via a communication path.
[0160] The functions of the fluid prediction model 801 can be found in the above description and will not be repeated here.
[0161] The transmission module 802 is used to obtain the measurement data and the predicted time span corresponding to the first time provided by the user; input parameters to the interface according to the predicted time span so that the time resolution of the fluid prediction model is configured to be equal to the predicted time span, and input the data corresponding to the first time into the fluid prediction model.
[0162] As a possible implementation, the transmission module 802 may further obtain the prediction data corresponding to the second time, and transmit the prediction data corresponding to the second time to the user.
[0163] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0164] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a terminal device (which can be a personal computer, mobile phone, or network device, etc.) or a processor (processor) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0165] This application also provides Fig. 9 The computing device 900 shown in FIG. 900 includes a bus 901 , a processor 902 , a communication interface 903 , and a memory 904 . The processor 902 , the memory 904 , and the communication interface 903 communicate with each other via the bus 901 .
[0166] Among them, the processor 902 can be a central processing unit (CPU) or other processors, such as a graphics processing unit (GPU), a microprocessor (MP), a digital signal processor (DSP), a coprocessor (to assist the central processor to complete corresponding processing and applications), an application specific integrated circuit (ASIC), a microcontroller unit (MCU) and other processors. The memory 904 can include a volatile memory (volatile memory), such as a random access memory (random access memory, RAM). The memory 904 can also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, an HDD or an SSD. The memory stores executable code, and the processor 902 executes the aforementioned Figure 3 The memory 904 may also include other software modules required for running processes such as an operating system (such as multiple modules in the neural network device 800). The operating system may be LINUX TM ,UNIX TM ,WINDOWS TM wait.
[0167] The present application also provides a computing device system, wherein the computing device system includes at least one Fig.10 The computing device 1000 shown in the figure includes a bus 1001, a processor 1002, a communication interface 1003 and a memory 1004. The processor 1002, the memory 1004 and the communication interface 1003 communicate with each other through the bus 1001. At least one computing device 1000 in the computing device system communicates with each other through a communication path.
[0168] The processor 1002 may be a CPU or other processors. The memory 1004 may include a volatile memory, such as a random access memory. The memory 1004 may also include a non-volatile memory, such as a read-only memory, a flash memory, a HDD or a SSD. The memory 1004 stores executable code, and the processor 1002 executes the executable code to execute the aforementioned Figure 3or any part or all of the method described in 5. The memory may also include an operating system and other software modules required for running the process. The operating system may be LINUX TM ,UNIX TM ,WINDOWS TM wait.
[0169] At least one computing device 1000 in the computing device system establishes communication with each other through a communication network, and any one or multiple modules in the neural network device 800 can be run on each computing device 1000.
[0170] The descriptions of the processes corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process, please refer to the relevant descriptions of other processes.
[0171] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes computer program instructions, which, when loaded and executed on a computer, generate all or part of the embodiments according to the present invention. Figure 3 The process or function described.
[0172] 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 one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line, or wireless (e.g., infrared, wireless, microwave, etc.) method. 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 therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD).
[0173] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A neural network device, characterized in that: The neural network device includes a fluid prediction model, and the fluid prediction model includes: a first space mapping operator, configured to receive measurement data corresponding to a first time input into the fluid prediction model, and map the measurement data corresponding to the first time from a first data space to a second data space, The time prediction operator provides an interface for configuring the time resolution of the fluid prediction model, and is used to iteratively process the measured data corresponding to the first time after mapping according to the parameters received from the interface to obtain the prediction data corresponding to the second time; The second space mapping operator is used to map the predicted data corresponding to the second time from the second data space to the first data space, and then output the predicted data corresponding to the second time.
2. The device according to claim 1, characterized in that The fluid prediction model is trained in the following manner: The fluid prediction model is trained using a gradient descent algorithm for optimization, wherein the loss function calculated in the optimization using the gradient descent algorithm indicates part or all of the following: The difference between the sample data and the output data of the second spatial mapping operator after the sample data is processed by the first spatial mapping operator and the second spatial mapping operator in sequence; The difference between the data output by the second spatial mapping operator and the real data after the sample data is processed by the first spatial mapping operator, the time prediction operator, and the second spatial mapping operator.
3. The device according to claim 1 or 2, characterized in that The parameter received from the interface is a time resolution parameter, which is linearly related to the time resolution of the fluid prediction model.
4. The device according to claim 3, characterized in that The product of the time resolution parameter and the basic time resolution of the fluid prediction model is equal to the time resolution of the fluid prediction model, and the basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model.
5. The device according to claim 4, characterized in that The time prediction operator iteratively processes the measured data corresponding to the mapped first time according to the parameters received from the interface, and is used to: The mapped measurement data corresponding to the first time is iterated r times, where r is equal to the time resolution parameter.
6. The device according to claim 1 or 2, characterized in that The parameter received from the interface is the time resolution of the flow prediction model.
7. The device according to claim 6, characterized in that The time prediction operator iteratively processes the measured data corresponding to the mapped first time according to the parameters received from the interface, and is used to: The number of iterations r is determined according to the parameters received from the interface, and the measurement data corresponding to the first time after mapping is iterated r times, where r is equal to the ratio of the time resolution to the basic time resolution of the fluid prediction model, and the basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model.
8. The device according to claim 7 or 4, characterized in that The basic time resolution of the fluid prediction model is equal to the time resolution of the time prediction operator.
9. The device according to any one of claims 1 to 8, characterized in that: The second data space is a space that is linearly correlated with time.
10. The device according to any one of claims 1 to 9, characterized in that: The measurement data describes the meteorological conditions at the first time, and the forecast data describes the meteorological conditions at the second time.
11. The device according to any one of claims 1 to 10, characterized in that: The neural network device also includes a transmission module; The transmission module is used to obtain the measurement data and predicted time span corresponding to the first time provided by the user; input parameters to the interface according to the predicted time span so that the time resolution of the fluid prediction model is configured to be equal to the predicted time span, and input the data corresponding to the first time into the fluid prediction model.
12. The device according to claim 11, characterized in that The transmission module is further used to: obtain the prediction data corresponding to the second time, and transmit the prediction data corresponding to the second time to the user.
13. A model training method, characterized in that: The method is used to train a fluid prediction model, wherein the fluid prediction model includes a first space mapping operator, a time prediction operator, and a second space mapping operator, wherein the first space mapping operator and the second space mapping operator are used to implement space mapping, and the time prediction operator is used to iteratively process input data to output prediction data, and the method includes: The fluid prediction model is trained using a gradient descent algorithm for optimization, wherein the loss function calculated in the optimization using the gradient descent algorithm indicates the following differences: The difference between the sample data and the output data of the second spatial mapping operator after the sample data is processed by the first spatial mapping operator and the second spatial mapping operator in sequence; The difference between the data output by the second spatial mapping operator and the real data after the sample data is processed by the first spatial mapping operator, the time prediction operator, and the second spatial mapping operator.
14. The method according to claim 13, characterized in that The step of optimizing the fluid prediction model by using a gradient descent algorithm includes: A gradient descent algorithm is called to calculate the gradient of the loss function, and the weights in the fluid prediction model are adjusted according to the gradient.
15. The method according to claim 13 or 14, characterized in that Before the time prediction operator uses the gradient descent algorithm to optimize the fluid prediction model during training, the time prediction operator also includes: The time resolution of the fluid prediction model is configured as a set value through the interface.
16. The method according to claim 15, characterized in that The configuring the time resolution of the fluid prediction model to a set value through the interface includes: A time resolution parameter is inputted from the interface, and the time resolution parameter is linearly related to the set value.
17. The method according to claim 16, characterized in that The product of the time resolution parameter and the basic time resolution of the fluid prediction model is equal to the set value, and the basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model.
18. The method according to claim 16, characterized in that The time resolution parameter is the number of iterations when the time prediction operator iteratively processes the input data.
19. A time-based prediction method, characterized in that: The method is applied to a neural network device, wherein the neural network device is deployed with a fluid prediction model, and the fluid prediction model provides an interface for configuring the time resolution of the fluid prediction model. The method includes: Obtain the measurement data corresponding to the first time and the predicted time span provided by the user; Configuring the time resolution of the fluid prediction model through the interface according to the prediction time span, and inputting the measurement data corresponding to the first time into the fluid prediction model, wherein the time resolution of the fluid prediction model is equal to the prediction time span; Obtain prediction data corresponding to a second time output by the fluid prediction model, and feed back the prediction data corresponding to the second time to the user, wherein the first time and the second time satisfy the prediction time span.
20. The method of claim 19, wherein: The fluid prediction model outputs prediction data corresponding to the second time, including: A first space mapping operator in the fluid prediction model maps the measurement data corresponding to the first time from a first data space to a second data space; The time prediction operator in the fluid prediction model provides an interface for configuring the time resolution of the fluid prediction model. The time prediction operator in the fluid prediction model iteratively processes the measured data corresponding to the mapped first time according to the parameters received from the interface to obtain the predicted data corresponding to the second time. The second space mapping operator in the fluid prediction model maps the prediction data corresponding to the second time from the second data space to the first data space, and outputs the prediction data corresponding to the second time.
21. The method according to claim 19 or 20, characterized in that The parameter received from the interface is a time resolution parameter, which is linearly related to the time resolution of the fluid prediction model.
22. The method according to claim 21, characterized in that The product of the time resolution parameter and the basic time resolution of the fluid prediction model is equal to the time resolution of the fluid prediction model, and the basic time resolution of the fluid prediction model is the minimum time span between the input data of the fluid prediction model and the output data of the fluid prediction model.
23. The method of claim 22, wherein: The time prediction operator iteratively processes the mapped data corresponding to the first time according to the parameters received from the interface, including: The time prediction operator iterates the mapped data corresponding to the first time r times, where r is equal to the time resolution parameter.
24. A computing device, characterized in that The computing device comprises a processor and a memory, wherein the processor is configured to call computer program instructions stored in the memory to execute the method according to any one of claims 13 to 23.
25. A computing device program product, characterized in that The computing device program product comprises computer instructions which, when executed by a computing device, cause the computing device to perform the method of any one of claims 13 to 23.