Data generation method and device based on interval segmentation consistency, equipment and medium
By constructing a data generation method based on interval partitioning consistency, employing an average velocity prediction network, and utilizing linear interpolation and algebraic operations, the problems of low inference efficiency and stability in real-time financial scenarios are solved, achieving efficient and robust data generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-17
AI Technical Summary
Existing generative models suffer from low inference efficiency in real-time financial scenarios, failing to meet the real-time requirements of high-frequency environments. Furthermore, the training objectives of stream matching models are unstable, affecting the robustness of the models under extreme market conditions. Moreover, their reliance on complex differential operations leads to hardware deployment compatibility and stability issues.
By constructing a data generation method based on interval segmentation consistency, an average velocity prediction network is adopted. By using linear interpolation and algebraic operations and abandoning differential operations, the network is trained to generate target data, enabling single-step or few-step inference.
It enables the efficient generation of high-fidelity data in financial scenarios, meeting real-time requirements, improving the robustness of the model and the stability of hardware deployment, and reducing implementation complexity.
Smart Images

Figure CN121882121A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology in financial scenarios, and in particular to a data generation method, apparatus, device and medium based on interval segmentation consistency. Background Technology
[0002] In the financial sector, generative models are widely used in key tasks such as high-frequency trading data simulation, market risk scenario generation, credit score synthesis, and fraud detection sample enhancement.
[0003] While existing generation methods based on diffusion models and flow matching have made progress in fields such as image and speech processing, their iterative sampling mechanisms have revealed significant shortcomings in real-time financial scenarios. First, financial applications, such as real-time trading strategy backtesting or dynamic value at risk (VaR) calculation, require models to generate high-fidelity data with extremely low latency. Existing methods, however, require tens to hundreds of inference steps, resulting in low inference efficiency and failing to meet the real-time requirements of high-frequency environments. Second, the instantaneous velocity field constructed in flow matching models suffers from unstable training objectives, exhibiting poor alignment with the final inference objective. This can easily introduce accumulated errors in the generation of financial time series data based on interval segmentation consistency, affecting the model's robustness under extreme market conditions. Furthermore, while existing simplified methods such as the MeanFlow model attempt to introduce the concept of average velocity, they rely on differential operations such as the Jacobian-Vector Product (JVP), increasing implementation complexity and posing compatibility and stability challenges in hardware deployment, particularly in the heterogeneous computing environments common in financial institutions, where efficient operation is difficult.
[0004] Therefore, these shortcomings of existing technologies limit the practical application of generative models in real-time financial decision-making, risk monitoring, and large-scale simulation. Thus, a new data generation method is needed that can eliminate complex differential operations and achieve efficient single-step or few-step inference by constructing a consistent average velocity field. Summary of the Invention
[0005] The purpose of this invention is to provide a data generation method, apparatus, device, and storage medium based on interval partitioning consistency, aiming to solve the problem of how to achieve efficient generation of target data from random noise without relying on complex differential operations.
[0006] In a first aspect, embodiments of the present invention provide a data generation method based on interval segmentation consistency, comprising: Obtain a time-series data sample set containing sample data and corresponding random noise; The first time point, the second time point, and the third time point are randomly sampled in chronological order; wherein, the first time point to the second time point constitutes the first time interval, and the second time point to the third time point constitutes the second time interval; The sample data and random noise are subjected to linear interpolation to generate the first path point; The average velocity at the first path point corresponding to the second time interval is calculated by the average velocity prediction network to obtain the first average velocity. Using the first average speed and the length of the second time interval, the second path point at the second time point is calculated backward from the first path point. The average velocity at the second path point corresponding to the first time interval is calculated using the average velocity prediction network to obtain the second average velocity. Based on the length ratio of the first time interval and the second time interval to the total time interval, the first average velocity and the second average velocity are weighted and combined to obtain the target average velocity. The difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed is calculated within the total time interval, and a loss function is constructed based on the difference. The average velocity prediction network is trained by adjusting its parameters using the backpropagation algorithm to minimize the loss function. Input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate the target data through a single forward calculation of the network.
[0007] Secondly, embodiments of the present invention provide a data generation apparatus based on interval segmentation consistency, comprising: The acquisition unit is used to acquire a time-series data sample set containing sample data and corresponding random noise; The sampling unit is used to randomly sample a first time point, a second time point, and a third time point in chronological order; wherein the first time point to the second time point constitutes a first time interval, and the second time point to the third time point constitutes a second time interval; The first path generation unit is used to perform linear interpolation processing on the sample data and random noise to generate the first path point; The first velocity generation unit is used to calculate the average velocity at the first path point corresponding to the second time interval through the average velocity prediction network, and obtain the first average velocity. The second path generation unit is used to calculate the second path point at the second time point by reverse calculation from the first path point using the first average speed and the length of the second time interval. The second velocity generation unit is used to calculate the average velocity at the second path point corresponding to the first time interval through the average velocity prediction network, and obtain the second average velocity. The target speed generation unit is used to weight and combine the first average speed and the second average speed according to the length ratio of the first time interval and the second time interval to the total time interval to obtain the target average speed. The loss function construction unit is used to calculate the difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed within the total time interval, and to construct a loss function based on the difference. The network optimization unit is used to adjust the parameters of the average velocity prediction network through the backpropagation algorithm to minimize the loss function and complete the training of the average velocity prediction network. The target data generation unit is used to input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate target data through a single forward calculation of the network.
[0008] Thirdly, embodiments of the present invention provide a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data generation method based on interval partitioning consistency described in the first aspect.
[0009] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the data generation method based on interval partitioning consistency described in the first aspect.
[0010] In the aforementioned data generation method, apparatus, device, and storage medium based on interval segmentation consistency, the following steps are taken: A time-series data sample set containing sample data and corresponding random noise is acquired; a first time point, a second time point, and a third time point are randomly sampled in chronological order; wherein the first time point to the second time point constitutes a first time interval, and the second time point to the third time point constitutes a second time interval; linear interpolation is performed on the sample data and random noise to generate a first path point; the average velocity at the first path point corresponding to the second time interval is calculated using an average velocity prediction network to obtain a first average velocity; and a second path point at the second time point is calculated backward from the first path point using the first average velocity and the length of the second time interval. The average velocity prediction network calculates the average velocity at the second path point corresponding to the first time interval, obtaining a second average velocity. Based on the length ratio of the first and second time intervals relative to the total time interval, the first and second average velocities are weighted and combined to obtain a target average velocity. The difference between the average velocity predicted by the average velocity prediction network for the first path point within the total time interval and the target average velocity is calculated, and a loss function is constructed based on this difference. The parameters of the average velocity prediction network are adjusted using a backpropagation algorithm to minimize the loss function, completing the training of the average velocity prediction network. The time series data to be predicted and the specified start and end times are input into the trained average velocity prediction network, and the target data is generated through a single forward computation. In this invention, for data generation applications in financial scenarios, the reliance on instantaneous velocity fields in traditional flow matching models is abandoned, and instead, a more physically meaningful "average velocity field" is directly modeled and learned. The entire method is divided into two stages: training and inference. During the training phase, the total path interval is divided into two time intervals by randomly sampling three time points. Linear interpolation and algebraic operations are used to construct the target average velocity without differentiation, which serves as the supervision signal to train the average velocity prediction network. During the inference phase, the trained average velocity prediction network has internalized the overall mapping relationship from noise to data. Therefore, it can directly map the input random noise into structured target data in one step through a single forward computation, achieving a paradigm shift from iterative sampling to one-step generation. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1This is a schematic diagram of an application environment for the data generation method based on interval segmentation consistency provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a data generation method based on interval segmentation consistency provided in an embodiment of the present invention; Figure 3 A schematic block diagram of a data generation device based on interval segmentation consistency provided in an embodiment of the present invention; Figure 4 A schematic diagram of a computer device is provided for an embodiment of the present invention; Figure 5 Another structural schematic diagram of a computer device is provided for an embodiment of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] The data generation method based on interval segmentation consistency provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The client receives a time-series data sample set containing sample data and corresponding random noise from the user input. The server obtains the time-series data sample set from the client and randomly samples a first time point, a second time point, and a third time point in chronological order. The time interval from the first time point to the second time point constitutes the first time interval, and the time interval from the second time point to the third time point constitutes the second time interval. Linear interpolation is performed on the sample data and random noise to generate a first path point. The average velocity at the first path point corresponding to the second time interval is calculated using an average velocity prediction network to obtain the first average velocity. Using the first average velocity and the length of the second time interval, the second path point at the second time point is calculated backwards from the first path point. The average velocity prediction network then calculates the average velocity at the second path point. The network calculates the average velocity at the second path point corresponding to the first time interval, obtaining the second average velocity. Based on the length ratio of the first and second time intervals relative to the total time interval, the first and second average velocities are weighted and combined to obtain the target average velocity. The difference between the average velocity predicted by the average velocity prediction network for the first path point within the total time interval and the target average velocity is calculated, and a loss function is constructed based on this difference. The parameters of the average velocity prediction network are adjusted using a backpropagation algorithm to minimize the loss function, completing the training of the average velocity prediction network. The time series data to be predicted and the specified start and end time points are input into the trained average velocity prediction network, and the target data is generated through a single forward computation. In this invention, for data generation applications in financial scenarios, the reliance on instantaneous velocity fields in traditional flow matching models is abandoned, and instead, a more physically meaningful "average velocity field" is directly modeled and learned. The entire method is divided into two stages: training and inference. In the training stage, the total path interval is divided into two time intervals by randomly sampling three time points, and a target average velocity without differentiation is constructed using linear interpolation and algebraic operations. This target average velocity is used as a supervision signal to train the average velocity prediction network. During the inference phase, the trained average velocity prediction network has internalized the overall mapping relationship from noise to data. Therefore, it can directly map the input random noise into structured target data in one step through a single forward computation, realizing a paradigm shift from iterative sampling to one-step generation. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0015] Please see Figure 2 As shown, Figure 2 This is a flowchart illustrating the data generation method based on interval segmentation consistency provided in an embodiment of the present invention.
[0016] like Figure 2 As shown, the method includes steps S201 to S210.
[0017] S201. Obtain a time-series data sample set containing sample data and corresponding random noise; In step S201, the time-series data sample set refers to a data set composed of data points arranged in chronological order. Each data point not only contains the sample data itself, but also has corresponding random noise superimposed on it. This can realistically simulate the data situation in the actual environment and provide more reliable input for subsequent data analysis and model training.
[0018] For example, in the financial field, the sample data in a time-series data set refers to real, historical, or cleaned sequences of financial data, such as a multi-dimensional vector sequence of the opening, highest, lowest, and closing prices (OHLC) of a stock for each trading day over the past year, or a set of monthly repayment records for credit application customers. The corresponding random noise is typically a random vector sampled from a standard Gaussian distribution (normal distribution), with the same dimension as the sample data. In the model training process described below, each real data sample is paired with a random noise sample, together forming the starting and ending points of a learnable evolutionary path from pure noise to structured data.
[0019] S202. Randomly sample the first time point, the second time point, and the third time point in chronological order; wherein, the first time point to the second time point constitutes the first time interval, and the second time point to the third time point constitutes the second time interval; Step S202 aims to obtain relevant data or information more comprehensively and accurately in different time periods by setting different time points and time intervals, avoiding the limitations that may be caused by fixed-time sampling, thereby truly reflecting the dynamic changes of the research object and providing a rich and representative data foundation for subsequent analysis and processing.
[0020] In one embodiment, step S202 includes: Randomly sample a first time point, a second time point, and a third time point within a predefined time range, wherein the first time point is less than the second time point and the second time point is less than the third time point; The interval between the first time point and the second time point is defined as the first time interval, and the interval between the second time point and the third time point is defined as the second time interval.
[0021] In this embodiment, the time range refers to the time axis interval, which is normalized to a continuous interval of [0,1], conforming to the standard form of the probabilistic flow ordinary differential equation, where 0 represents the starting point of the data distribution (pure noise) and 1 represents the ending point of the data distribution (clean data). Randomly sampling the first time point r, the second time point s, and the third time point t within the time interval [0,1] essentially involves randomly dividing the continuous time stream into two adjacent sub-intervals, namely the first time interval [r,s] and the second time interval [r,t]. This random sampling mechanism is key to preventing the model from memorizing fixed patterns and forcing the model to learn general dynamic principles; its purpose is to make the model understand that no matter how the path is divided, its local average velocity and global average velocity must satisfy an algebraic relationship based on time weights, thereby establishing a self-consistent average velocity prediction network that runs through the entire generation path.
[0022] For example, in the financial field, when generating minute-by-minute data for the simulated "Euro to US Dollar exchange rate," the first time point r=0.2 corresponds to 9:00 AM Beijing time, the second time point s=0.5 corresponds to 11:30 AM, and the third time point t=0.8 corresponds to 2:00 PM. During training, the model is required to learn the relationship between the average rate of change from 9:00 to 11:30 (the first time interval), from 11:30 to 2:00 (the second time interval), and from 9:00 to 2:00 (the total time interval). Through such random sampling training, the network eventually learns to understand the evolution patterns of the exchange rate across different time segments.
[0023] S203. Perform linear interpolation on the sample data and random noise to generate the first path point; Step S203 aims to combine sample data and random noise using linear interpolation to generate a first path point with specific distribution characteristics in the data space. The generated first path point not only retains the basic characteristics of the sample data but also incorporates the variability introduced by random noise, providing a richer and more diverse information foundation for subsequent data processing and analysis.
[0024] In one embodiment, step S203 includes: The sample data x is combined with random noise ε, where the weighting coefficient of the sample data is weight 1 minus the value of the third time point t, and the weighting coefficient of the random noise is the value of the third time point t. Based on the weighting coefficients, the first path point zt is generated by calculating using the linear interpolation formula zt = (1 - t) * x + t * ε.
[0025] In this embodiment, linear interpolation is an effective method for constructing probabilistic paths. In the linear interpolation formula, when t=0, the path point is clean data (i.e., sample data x); when t=1, the path point is pure noise data (i.e., random noise ε); and when t is in an intermediate state, the path point is a linear mixture of sample data x and random noise ε. This construction method provides a smooth and deterministic evolution trajectory for the generation process, enabling the concept of average velocity to be clearly defined and calculated.
[0026] Based on this, the linear interpolation path in this embodiment provides a simple, stable, and computable bridge that connects the data space and the noise space, avoiding the numerical instability that may be caused by complex stochastic differential equations, making the entire training process more controllable and efficient.
[0027] For example, in the financial field, suppose that when synthesizing "customer credit score" data, x represents the complete credit profile vector of a customer, and ε represents a completely random noise vector. At time t=0.6, the generated first path point zt represents a mixed state where "60% is random noise and 40% is the actual credit profile structure." The network's task is to learn how to deduce the average rate of evolution over a period of time from this mixed state.
[0028] S204. Calculate the average velocity at the first path point corresponding to the second time interval using the average velocity prediction network to obtain the first average velocity. Step S204 aims to utilize the data processing and prediction capabilities of the average speed prediction network to accurately calculate the average speed of the first path point within the second time interval. This average speed prediction network learns from the complex relationships between speed variation patterns, path characteristics, and time factors in historical data. Based on known conditions, it can accurately infer the average speed of the first path point within a specified time interval (the second time interval), thereby obtaining the first average speed and providing crucial speed reference information for subsequent path planning and decision-making.
[0029] In one embodiment, step S204 includes: The spatial coordinates of the first path point, the second time point, and the third time point are concatenated to form a joint feature vector. The joint feature vector is input into the multilayer perceptron module of the average velocity prediction network, and nonlinear transformation is performed through at least one fully connected layer and a nonlinear activation function to extract high-dimensional features. The high-dimensional features are mapped through a linear output layer to generate a vector with the same zt dimension as the first path point, which is then used as the average velocity of the first path point in the second time interval, thus obtaining the first average velocity.
[0030] In this embodiment, the input to the average velocity prediction network is a joint feature vector, which carries spatial information of path points and time interval information of time points. Through feature concatenation, the average velocity prediction network can clearly know where it is currently and which interval of velocity to predict. A multilayer perceptron (MLP) and nonlinear activation functions (such as ReLU and SiLU) are responsible for extracting complex nonlinear patterns from the joint features, which is crucial for the network to analyze the true average velocity field. The final linear output layer maps the high-dimensional features to a space with the same dimension as the data, directly outputting the velocity vector.
[0031] The average velocity prediction network in this embodiment uses a multilayer perceptron (MLP / Fully-Connected Network) module, which can effectively learn the complex nonlinear mapping between input features (path point coordinates and time points). It has a simple structure and stable training, and is especially suitable for financial structured data with flattened vectors as inputs, such as stock price vectors and credit scoring features.
[0032] The working process of the average velocity prediction network will be further explained below with specific examples.
[0033] Suppose the task is to generate simulated daily stock chart data. Each data sample is a 4-dimensional vector containing the normalized [open price, highest price, lowest price, closing price]. Meanwhile, time points s and t are scalars within the interval [0,1].
[0034] First, assume the first path point is a 4-dimensional vector, such as [0.15, 0.22, 0.10, 0.20], representing an intermediate state at time t; the second time point s and the third time point t are 0.7 and 0.9 respectively; concatenate these three inputs to form a 6-dimensional joint feature vector [0.15, 0.22, 0.10, 0.20, 0.7, 0.9]; the purpose is to explicitly associate the state information of the data with the temporal context information, informing the network that what needs to be predicted is the average velocity in the interval from the second time point s to the third time point t.
[0035] Then, the 6-dimensional joint feature vector is fed into the backbone of the MLP; assuming the network structure is: input layer (6-dimensional) → hidden layer 1 (128-dimensional) → hidden layer 2 (64-dimensional) → output layer (4-dimensional); Fully connected layer 1: The 6-dimensional input vector is multiplied by a weight matrix of [6, 128] and then a 128-dimensional bias vector is added to obtain a 128-dimensional pre-activation value; Nonlinear Activation 1: Apply the SiLU (or ReLU) activation function to the 128-dimensional vector. The SiLU function (x * sigmoid(x)) typically provides a smoother gradient than ReLU, which helps with training stability. This step introduces nonlinearity, enabling the network to learn complex patterns; Fully connected layer 2: Multiply the 128-dimensional activated features by a weight matrix of [128, 64], and add a bias to obtain a 64-dimensional vector; Nonlinear activation 2: Apply the SiLU activation function again.
[0036] Finally, the 64-dimensional features are fed into the output layer (a linear fully connected layer of [64, 4] with no activation function); the role of this layer is to map the learned high-dimensional features back to the velocity space we need; it converts the 64-dimensional vector into a 4-dimensional vector, for example [0.05, -0.02, 0.01, 0.03]; this 4-dimensional output vector is the first average velocity predicted by the network; its physical meaning is the average rate of change of the four features of opening price, highest price, lowest price, and closing price within the time interval [0.7, 0.9], starting from the path point (state [0.15, 0.22, 0.10, 0.20]).
[0037] Based on this, through the specific working process of the MLP network described above, this invention achieves the function of mapping any (path point, start time, end time) tuple to a precise average velocity vector. The nonlinear fitting capability of the MLP network ensures that it can capture the complex dynamics of financial data evolution. The entire processing is completely forward-biased and differentiable, requiring no complex differential operators, thus satisfying the core objectives of efficient training and hardware-friendly operation.
[0038] S205. Using the first average speed and the length of the second time interval, the second path point at the second time point is calculated backward from the first path point. Step S205 aims to establish the correlation between the states of path points at different time points through concise algebraic back deduction, providing a necessary foundation for constructing a self-consistent supervision signal during training.
[0039] In one embodiment, step S205 includes: Calculate the length of the second time interval, where the length of the second time interval is the difference between the third time point and the second time point; Multiply the first average velocity by the length of the second time interval to obtain the displacement vector; The second path point is obtained by subtracting the displacement vector from the first path point.
[0040] The process in this embodiment is as follows: First, the length of the second time interval is calculated, which is numerically equal to the difference between the value at the third time point and the value at the second time point. Next, the calculated first average velocity is multiplied by the length of the second time interval to obtain a displacement vector. This vector represents the total effect of movement along the data path within the corresponding time interval. Finally, this calculated displacement vector is subtracted from the spatial coordinates of the first path point, and the result is defined as the second path point at the second time point.
[0041] Based on this, this embodiment is essentially a reverse derivation of the uniform motion model. By establishing a bridge connecting states at different time points, the network can verify and constrain predictions of previous time periods based on information from subsequent time periods, thus providing crucial intermediate variables for building interval segmentation consistency. The entire process involves only basic algebraic operations, completely avoiding complex differential operations, ensuring computational stability and efficiency.
[0042] For example, in simulating the generation of a stock price path, assume the network has predicted the average rate of price change (first average velocity) from 1 PM (second time point) to 3 PM (third time point). To obtain the path point state at 1 PM, the system performs a backtracking calculation: first, it determines the length of the time interval (two hours), then multiplies the predicted average velocity by this time length to obtain a total price change (displacement vector). Finally, by subtracting this total change from the assumed stock price state at 3 PM (first path point), the stock price state at 1 PM (second path point) can be calculated. This state will serve as the input for the next prediction.
[0043] S206. Calculate the average velocity at the second path point corresponding to the first time interval using the average velocity prediction network to obtain the second average velocity. The purpose of step S206 is to symmetrically obtain the average velocity prediction for the first time interval [r, s]. The process is similar to S204, but the input becomes the second path point obtained through backtracking and the boundary of the first time interval [r, s].
[0044] In one embodiment, step S206 includes: The spatial coordinates of the second path point, the first time point, and the second time point are concatenated to form a joint feature vector. The joint feature vector is input into the multilayer perceptron module of the average velocity prediction network. This module shares weight parameters with the module that processes the first path point and performs feature transformation through at least one fully connected layer and a nonlinear activation function. The transformed features are mapped through a linear output layer to generate a vector with the same dimension as the second path point. This vector is the average velocity of the second path point within the first time interval, thus obtaining the second average velocity.
[0045] This embodiment is a symmetrical operation to the specific embodiment of step S204 described above, but it contains a crucial design element: weight sharing. That is, the network module processing the first path point and the network module processing the second path point use the same set of parameters. This means that regardless of which time interval the network is required to predict the average velocity, the same core is invoked. This forces the network to learn a unified, universal average velocity field function, rather than learning different functions for different time intervals. This sharing mechanism significantly reduces the number of model parameters, lowers the risk of overfitting, and ensures the consistency of model behavior, which is key to the model's successful generalization.
[0046] S207. Based on the length ratio of the first time interval and the second time interval to the total time interval, the first average velocity and the second average velocity are weighted and combined to obtain the target average velocity. Step S207 aims to define how to fuse the velocity predictions of the first and second time intervals to construct the final learning objective; the purpose is to provide the network with a self-consistent supervision signal that does not depend on external annotations for its predictions over the total time interval.
[0047] In one embodiment, step S207 includes: Calculate the ratio of the length of the first time interval to the length of the total time interval, and use it as the first weight; Calculate the ratio of the length of the second time interval to the length of the total time interval, and use it as the second weight; The target average speed is obtained by multiplying the second average speed by the first weight, multiplying the first average speed by the second weight, and then adding the results together.
[0048] In this embodiment, the weighting method used is linear interpolation based on interval length, which directly stems from the integral definition of average velocity. Specifically, the total time interval average velocity is equal to the weighted average of the average velocities of the first and second time intervals over time length; therefore, the target average velocity is an unbiased estimator of the true total time interval average velocity. The network is required to predict a total time interval average velocity that is consistent with this true target constructed from the average velocities of the first and second time intervals; this is the essence of the "interval segmentation consistency" constraint.
[0049] Based on this, the weighted combination scheme in this embodiment provides a self-consistent, manually labeled supervisory signal for network training.
[0050] For example, suppose the total time interval [r, t] is 2 hours long, with the first time interval [r, s] being 0.5 hours long and the second time interval [s, t] being 1.5 hours long. If the average speed in the first time interval is "increase of 0.2 yuan" and the average speed in the second time interval is "increase of 0.6 yuan", then the target average speed = (0.5 / 2)*0.2 + (1.5 / 2)*0.6 = 0.5 yuan / hour. The network's prediction value for the total time interval needs to align with this target of 0.5 yuan / hour.
[0051] S208. Calculate the difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed within the total time interval, and construct a loss function based on the difference. The purpose of step S208 is to quantify the prediction error of the average velocity prediction network and transform it into an optimizable objective.
[0052] In one embodiment, step S208 includes: Input the first path point, the first time point, and the third time point into the average velocity prediction network to obtain the corresponding predicted average velocity. Calculate the L2 norm between the network-predicted average velocity and the target average velocity, and use the L2 norm as the difference value to construct the loss function.
[0053] In this embodiment, the construction method of the loss function is clearly defined, namely, using the L2 norm (mean squared error) to measure the difference between the network's prediction and the consistency target. L2 loss is a standard choice in regression tasks; it penalizes larger errors more severely, effectively driving the network's predictions to converge quickly towards the target value. The goal of the entire training process is to minimize this L2 norm-based loss function, ensuring that the network's predictions satisfy the aforementioned algebraic consistency constraint across various randomly segmented intervals.
[0054] S209. Adjust the parameters of the average velocity prediction network using the backpropagation algorithm to minimize the loss function and complete the training of the average velocity prediction network. The purpose of step S209 is to optimize the parameters of the average velocity prediction network through iterative optimization.
[0055] In one embodiment, step S209 includes: The gradient of the network parameters is predicted by calculating the average velocity based on the loss function. The gradient is passed from the network output layer to the input layer using the backpropagation algorithm; By employing stochastic gradient descent or its variant optimization algorithm, the average velocity of gradient updates is used to predict all parameters of the network in order to minimize the loss function and thus complete the iterative training of the network.
[0056] In this embodiment, after calculating the gradient using the loss function, the error signal is propagated backward from the network's output layer to the input layer layer by layer using the backpropagation algorithm, accurately calculating the "contribution" of each parameter to the final error. Subsequently, a stochastic gradient descent (or its adaptive variants, such as Adam or AdamW) optimizer is used to fine-tune all network parameters (including shared MLP layer parameters and output layer parameters) based on the gradient direction and learning rate. Through a preset number of iterations, the network parameters are gradually optimized, making the predicted average speed of the target increasingly consistent with the interval segmentation consistency principle.
[0057] S210. Input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate the target data through a single forward calculation of the network. The purpose of step S210 is to perform the final application—efficient data generation, which compresses the traditional iterative generation process into a linear function evaluation, thereby meeting the needs of real-time financial applications.
[0058] In one embodiment, step S210 includes: Obtain the noise starting point of the time series data to be predicted. The noise starting point is random noise that conforms to a specific distribution. The noise origin is used as the path point and is input into the trained average velocity prediction network along with the specified start time point 0 and end time point 1. The target data corresponding to the noise starting point is directly output by performing a forward calculation of the average velocity prediction network.
[0059] In this embodiment, once the network training is complete, a complete and efficient mapping relationship from noise to data has been internalized. To generate a new data sample, simply sample a starting point z1 from a simple random noise distribution and input it along with a start time of 0 and an end time of 1 into the trained average velocity prediction network. The network directly outputs the total average velocity from the starting point to the end point through a single forward computation, and then obtains the target data x through a single algebraic operation (z1 - predicted velocity). The purpose of this step is to achieve extreme inference efficiency, compressing the traditional iterative generation process into a linear function evaluation, thereby meeting the needs of real-time financial applications.
[0060] Based on this, the significant advantage of single-step inference in terms of efficiency is that it transforms the generation task from a sequential decision problem into a simple function evaluation problem, making it possible to generate data in real time on edge devices or high-concurrency servers.
[0061] As can be seen, in the overall scheme of steps S201-210 above, the data generation application based on interval segmentation consistency for financial scenarios abandons the dependence of traditional flow matching models on instantaneous velocity fields, and instead directly models and learns a more physically meaningful "average velocity field". The entire method is divided into two stages: training and inference. In the training stage, the total path interval is divided into two time intervals by randomly sampling three time points, and a target average velocity without differentiation is constructed using linear interpolation and algebraic operations. This target average velocity is used as a supervision signal to train the average velocity prediction network. In the inference stage, the trained average velocity prediction network has internalized the overall mapping relationship from noise to data. Therefore, it can directly map the input random noise into structured target data in one step through a single forward computation, realizing a paradigm shift from iterative sampling to one-step generation.
[0062] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0063] In one embodiment, a data generation apparatus based on interval partitioning consistency is provided, which corresponds one-to-one with the data generation method based on interval partitioning consistency described in the above embodiments. For example... Figure 3 As shown, the data generation device based on interval segmentation consistency includes: an acquisition unit 301, a sampling unit 302, a first path generation unit 303, a first velocity generation unit 304, a second path generation unit 305, a second velocity generation unit 306, a target velocity generation unit 307, a loss function construction unit 308, a network optimization unit 309, and a target data generation unit 310. Detailed descriptions of each functional module are as follows: The acquisition unit 301 is used to acquire a time-series data sample set containing sample data and corresponding random noise; The sampling unit 302 is used to randomly sample a first time point, a second time point, and a third time point in chronological order; wherein the first time point to the second time point constitutes a first time interval, and the second time point to the third time point constitutes a second time interval; The first path generation unit 303 is used to perform linear interpolation processing on sample data and random noise to generate the first path point; The first velocity generation unit 304 is used to calculate the average velocity at the first path point corresponding to the second time interval through the average velocity prediction network, and obtain the first average velocity. The second path generation unit 305 is used to calculate the second path point at the second time point by using the first average speed and the length of the second time interval from the first path point. The second velocity generation unit 306 is used to calculate the average velocity at the second path point corresponding to the first time interval through the average velocity prediction network, and obtain the second average velocity. The target velocity generation unit 307 is used to weight and combine the first average velocity and the second average velocity according to the length ratio of the first time interval and the second time interval relative to the total time interval to obtain the target average velocity. The loss function construction unit 308 is used to calculate the difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed within the total time interval, and to construct a loss function based on the difference. The network optimization unit 309 is used to adjust the parameters of the average velocity prediction network through the backpropagation algorithm to minimize the loss function and complete the training of the average velocity prediction network. The target data generation unit 310 is used to input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate target data through a single forward calculation of the network.
[0064] In one embodiment, the sampling unit 302 is specifically used for: Randomly sample a first time point, a second time point, and a third time point within a predefined time range, with the time range from 0 to 1; wherein the first time point is less than the second time point and the second time point is less than the third time point; The interval between the first time point and the second time point is defined as the first time interval, and the interval between the second time point and the third time point is defined as the second time interval.
[0065] In one embodiment, the first path generation unit 303 is specifically used for: The sample data x is combined with random noise ε, where the weighting coefficient of the sample data is weight 1 minus the value of the third time point t, and the weighting coefficient of the random noise is the value of the third time point t. Based on the weighting coefficients, the first path point zt is generated by calculating using the linear interpolation formula zt = (1 - t) * x + t * ε.
[0066] In one embodiment, the first speed generation unit 304 is specifically used for: The spatial coordinates of the first path point, the second time point, and the third time point are concatenated to form a joint feature vector. The joint feature vector is input into the multilayer perceptron module of the average velocity prediction network, and nonlinear transformation is performed through at least one fully connected layer and a nonlinear activation function to extract high-dimensional features. The high-dimensional features are mapped through a linear output layer to generate a vector with the same zt dimension as the first path point, which is then used as the average velocity of the first path point in the second time interval, thus obtaining the first average velocity.
[0067] In one embodiment, the second path generation unit 305 is specifically used for: Calculate the length of the second time interval, where the length of the second time interval is the difference between the third time point and the second time point; Multiply the first average velocity by the length of the second time interval to obtain the displacement vector; The second path point is obtained by subtracting the displacement vector from the first path point.
[0068] In one embodiment, the second speed generation unit 306 is specifically used for: The spatial coordinates of the second path point, the first time point, and the second time point are concatenated to form a joint feature vector. The joint feature vector is input into the multilayer perceptron module of the average velocity prediction network. This module shares weight parameters with the module that processes the first path point and performs feature transformation through at least one fully connected layer and a nonlinear activation function. The transformed features are mapped through a linear output layer to generate a vector with the same dimension as the second path point. This vector is the average velocity of the second path point within the first time interval, thus obtaining the second average velocity.
[0069] In one embodiment, the target velocity generation unit 307 is specifically used for: Calculate the ratio of the length of the first time interval to the length of the total time interval, and use it as the first weight; Calculate the ratio of the length of the second time interval to the length of the total time interval, and use it as the second weight; The target average speed is obtained by multiplying the second average speed by the first weight, multiplying the first average speed by the second weight, and then adding the results together.
[0070] In one embodiment, the loss function construction unit 308 is specifically used for: Input the first path point zt, the first time point r, and the third time point t into the average velocity prediction network to obtain the predicted average velocity u0(zt, r, t); Calculate the L2 norm between the network-predicted average velocity u0(zt, r, t) and the target average velocity; The loss function is constructed using the L2 norm as the difference value.
[0071] In one embodiment, the network optimization unit 309 is specifically used for: The gradient of the network parameters is predicted by calculating the average velocity based on the loss function. The gradient is passed from the network output layer to the input layer using the backpropagation algorithm; By employing stochastic gradient descent or its variant optimization algorithm, the average velocity of gradient updates is used to predict all parameters of the network in order to minimize the loss function and thus complete the iterative training of the network.
[0072] In one embodiment, the target data generation unit 310 is specifically used for: Obtain the noise starting point of the time series data to be predicted. The noise starting point is random noise that conforms to a specific distribution. The noise origin is used as the path point and is input into the trained average velocity prediction network along with the specified start time point 0 and end time point 1. The target data corresponding to the noise starting point is directly output by performing a forward calculation of the average velocity prediction network.
[0073] Specific limitations regarding the interval partitioning consistency-based data generation device can be found in the limitations of the interval partitioning consistency-based data generation method described above, and will not be repeated here. Each module in the aforementioned interval partitioning consistency-based data generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0074] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side data generation method based on interval partitioning consistency.
[0075] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a data generation method based on interval partitioning consistency.
[0076] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Obtain a time-series data sample set containing sample data and corresponding random noise; The first, second, and third time points are randomly sampled in chronological order; the first time point to the second time point constitutes the first time interval, and the second time point to the third time point constitutes the second time interval. Linear interpolation is performed on the sample data and random noise to generate the first path point; The average velocity at the first path point corresponding to the second time interval is calculated by the average velocity prediction network to obtain the first average velocity. Using the first average speed and the length of the second time interval, the second path point at the second time point is calculated backward from the first path point. The average velocity at the second path point corresponding to the first time interval is calculated by the average velocity prediction network to obtain the second average velocity. Based on the ratio of the length of the first time interval and the second time interval to the total time interval, the first average velocity and the second average velocity are weighted and combined to obtain the target average velocity. The difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed is calculated over the total time interval, and a loss function is constructed based on the difference. The average velocity prediction network was trained by adjusting its parameters using the backpropagation algorithm to minimize the loss function. Input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate the target data through a single forward calculation of the network.
[0077] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Obtain a time-series data sample set containing sample data and corresponding random noise; The first, second, and third time points are randomly sampled in chronological order; the first time point to the second time point constitutes the first time interval, and the second time point to the third time point constitutes the second time interval. Linear interpolation is performed on the sample data and random noise to generate the first path point; The average velocity at the first path point corresponding to the second time interval is calculated by the average velocity prediction network to obtain the first average velocity. Using the first average speed and the length of the second time interval, the second path point at the second time point is calculated backward from the first path point. The average velocity at the second path point corresponding to the first time interval is calculated by the average velocity prediction network to obtain the second average velocity. Based on the ratio of the length of the first time interval and the second time interval to the total time interval, the first average velocity and the second average velocity are weighted and combined to obtain the target average velocity. The difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed is calculated over the total time interval, and a loss function is constructed based on the difference. The average velocity prediction network was trained by adjusting its parameters using the backpropagation algorithm to minimize the loss function. Input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate the target data through a single forward calculation of the network.
[0078] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0079] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0080] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0081] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A data generation method based on interval partition consistency, characterized in that, include: Obtain a time-series data sample set containing sample data and corresponding random noise; The first time point, the second time point, and the third time point are randomly sampled in chronological order; wherein, the first time point to the second time point constitutes the first time interval, and the second time point to the third time point constitutes the second time interval; The sample data and random noise are subjected to linear interpolation to generate the first path point; The average velocity at the first path point corresponding to the second time interval is calculated by the average velocity prediction network to obtain the first average velocity. Using the first average speed and the length of the second time interval, the second path point at the second time point is calculated backward from the first path point. The average velocity at the second path point corresponding to the first time interval is calculated using the average velocity prediction network to obtain the second average velocity. Based on the length ratio of the first time interval and the second time interval to the total time interval, the first average velocity and the second average velocity are weighted and combined to obtain the target average velocity. The difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed is calculated within the total time interval, and a loss function is constructed based on the difference. The average velocity prediction network is trained by adjusting its parameters using the backpropagation algorithm to minimize the loss function. Input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate the target data through a single forward calculation of the network. 2.The data generation method based on interval segmentation consistency according to claim 1, characterized in that: The random sampling of the first, second, and third time points in chronological order includes: Randomly sample a first time point, a second time point, and a third time point within a predefined time range, wherein the first time point is less than the second time point and the second time point is less than the third time point; The interval between the first time point and the second time point is defined as the first time interval, and the interval between the second time point and the third time point is defined as the second time interval. 3.The data generation method based on interval segmentation consistency according to claim 1, characterized in that: The step of performing linear interpolation on the sample data and random noise to generate the first path point includes: The sample data x is combined with random noise ε, wherein the weighting coefficient of the sample data is weight 1 minus the value of the third time point t, and the weighting coefficient of the random noise is the value of the third time point t. The first path point zt is generated by calculating using the linear interpolation formula zt = (1 - t) * x + t * ε based on the weighting coefficients. 4.The data generation method based on interval segmentation consistency according to claim 1, characterized in that: The step of calculating the average velocity at the first path point corresponding to the second time interval through the average velocity prediction network to obtain the first average velocity includes: The spatial coordinates of the first path point, the second time point, and the third time point are concatenated to form a joint feature vector. The joint feature vector is input into the multilayer perceptron module of the average velocity prediction network, and nonlinear transformation is performed through at least one fully connected layer and a nonlinear activation function to extract high-dimensional features. The high-dimensional features are mapped through a linear output layer to generate a vector with the same zt dimension as the first path point, which is then used as the average velocity of the first path point within the second time interval, thus obtaining the first average velocity.
5. The data generation method based on interval segmentation consistency according to claim 1, characterized in that: The step of using the first average speed and the length of the second time interval to calculate the second path point at the second time point from the first path point includes: Calculate the length of the second time interval, wherein the length of the second time interval is the difference between the third time point and the second time point; Multiply the first average velocity by the length of the second time interval to obtain the displacement vector; The second path point is obtained by subtracting the displacement vector from the first path point. 6.The data generation method based on interval segmentation consistency according to claim 1, characterized in that: The step of calculating the average velocity at the second path point corresponding to the first time interval through the average velocity prediction network to obtain the second average velocity includes: The spatial coordinates of the second path point, the first time point, and the second time point are concatenated to form a joint feature vector. The joint feature vector is input into the multilayer perceptron module of the average velocity prediction network. This module shares weight parameters with the module that processes the first path point and performs feature transformation through at least one fully connected layer and a nonlinear activation function. The transformed features are mapped through a linear output layer to generate a vector with the same dimension as the second path point. This vector is the average velocity of the second path point within the first time interval, thus obtaining the second average velocity.
7. The data generation method based on interval segmentation consistency according to claim 1, characterized in that: The step of weighting and combining the first average velocity and the second average velocity according to the length ratio of the first time interval and the second time interval to the total time interval to obtain the target average velocity includes: Calculate the ratio of the length of the first time interval to the length of the total time interval, and use it as the first weight; Calculate the ratio of the length of the second time interval to the length of the total time interval, and use it as the second weight; The target average speed is obtained by multiplying the second average speed by the first weight, multiplying the first average speed by the second weight, and then adding the results together.
8. A data generating apparatus based on interval partition consistency, characterized by comprising: include: The acquisition unit is used to acquire a time-series data sample set containing sample data and corresponding random noise; The sampling unit is used to randomly sample a first time point, a second time point, and a third time point in chronological order; wherein the first time point to the second time point constitutes a first time interval, and the second time point to the third time point constitutes a second time interval; The first path generation unit is used to perform linear interpolation processing on the sample data and random noise to generate the first path point; The first velocity generation unit is used to calculate the average velocity at the first path point corresponding to the second time interval through the average velocity prediction network, and obtain the first average velocity. The second path generation unit is used to calculate the second path point at the second time point by reverse calculation from the first path point using the first average speed and the length of the second time interval. The second velocity generation unit is used to calculate the average velocity at the second path point corresponding to the first time interval through the average velocity prediction network, and obtain the second average velocity. The target speed generation unit is used to weight and combine the first average speed and the second average speed according to the length ratio of the first time interval and the second time interval to the total time interval to obtain the target average speed. The loss function construction unit is used to calculate the difference between the average speed predicted by the average speed prediction network for the first path point and the target average speed within the total time interval, and to construct a loss function based on the difference value. The network optimization unit is used to adjust the parameters of the average velocity prediction network through the backpropagation algorithm to minimize the loss function and complete the training of the average velocity prediction network. The target data generation unit is used to input the time series data to be predicted and the specified start and end time points into the trained average velocity prediction network, and generate target data through a single forward calculation of the network.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the data generation method based on interval partitioning consistency as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the data generation method based on interval partitioning consistency as described in any one of claims 1 to 7.