A target prediction method for small sample data

By constructing phase distribution sequences and transition matrices, and combining them with position generation methods, high-quality model prediction training data is generated, solving the problem of training data generation for stochastic systems in small sample scenarios, and achieving efficient and accurate target prediction.

CN119829906BActive Publication Date: 2026-02-13CHENGDU MINGTU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411914443.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2026-02-13
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently generate the training data required for training large models of stochastic systems in small-sample scenarios, resulting in poor prediction performance. This is especially true in complex stochastic systems where the state space is enormous and the dimensionality curse problem is severe, making it difficult to solve through simple analysis.

Method used

By extracting small-sample time-series datasets, constructing phase distribution sequences and transition matrices, and combining them with position generation methods, high-quality model prediction training data is generated. The intelligent prediction model is then used for pre-training to generate high-precision target prediction results.

Benefits of technology

It can quickly generate large-scale, high-quality training data with small sample data, simplify the state transition calculation process, save computing resources, and improve the accuracy and efficiency of the prediction model. It is applicable to a variety of real-world scenarios such as audio generation and video generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829906B_ABST
    Figure CN119829906B_ABST
Patent Text Reader

Abstract

The application discloses a target prediction method for small sample data, which comprises the following steps: extracting a target small sample time series data set, grouping by time, constructing a phase distribution sequence, and further constructing a phase distribution transfer matrix; then, constructing a position generation method according to the phase distribution sequence and the small sample time series data set; then, generating random phase distribution information by a system, combining the phase distribution transfer matrix and the position generation method, and quickly obtaining a large-scale model prediction training data set; finally, constructing an intelligent prediction model according to the model prediction training data set, updating model parameters by pre-training the intelligent prediction model, and realizing target intelligent prediction for small sample data. The method can effectively solve the state transfer problem between adjacent time points, further generate large-scale high-quality training data, significantly improve the accuracy of the intelligent prediction model, and solve the problems of audio and video generation in a small sample scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing and artificial intelligence, and particularly relates to a target prediction method for small sample data. BACKGROUND

[0002] Most real systems are essentially random. Significant progress has been made in the analysis, optimization and design of random systems, and has been successfully applied in manufacturing, telecommunications, healthcare, finance, logistics, multimedia and other fields. Specific examples include parallel Markov chains, multiple independent Markov arrival processes, BMAP / PH / K queueing systems, and order statistics of multidimensional random variables. On the other hand, the above complex random systems are difficult to solve by simple analysis. In recent years, some scholars have begun to try to introduce large models and reinforcement learning techniques to study and deal with complex random models.

[0003] Large models need to be trained based on large-scale, high-quality samples (data) to achieve ideal prediction results. However, in real situations, it is difficult for organizations or individuals to obtain a large number of training samples that comply with legal regulations in a short period of time. If a model training sample is constructed by manual searching, it will consume a lot of human and time costs. To avoid such problems, samples that comply with multi-dimensional random processes are usually used to train large models of random systems, thereby generating a large number of training samples in a short period of time and reducing human and time investment.

[0004] The existing method is to use Kronecker product to combine two matrices into a larger matrix to construct a multi-dimensional Markov chain for the original random system. Specifically, the existing method tracks the phase of each dimension in the random process to construct a Markov chain for the evolution of the random system. If there are many parallel processes in the system, a large number of states will be involved, resulting in a huge state space and causing a serious curse of dimensionality problem, making it a very challenging task to track the phase transition.

[0005] In theory, reinforcement learning algorithms can be used to estimate the transition rate matrix of continuous-time Markov chains, learn the strategy by frequently interacting with the environment, and automatically update the corresponding information without prior knowledge. However, the implementation of such methods has certain complexity and challenges, as they need to interact with a large number of samples to obtain accurate estimates, which is difficult to apply to real small sample scenarios.

[0006] In summary, generating training samples for large models of such random systems is a time-consuming and resource-consuming process, and so far there is no effective solution. Based on the above deficiencies, a target prediction method for small sample data is needed to solve the state transition problem between adjacent time points in a small sample scenario, and ultimately achieve high-precision intelligent prediction. SUMMARY

[0007] The purpose of the present application is to provide a target prediction method for small sample data. By means of the phase state transition and position generation method proposed in the present application, large-scale high-quality training data is quickly generated from small sample data, so as to train an intelligent prediction model to generate high-quality prediction results.

[0008] One of the purposes of the present application is realized by the following technical solutions:

[0009] A target prediction method for small sample data, comprising the following steps:

[0010] Step S1: Extracting a target small sample time series data set, grouping by time, and constructing a phase distribution sequence;

[0011] Step S2: Constructing a phase distribution transition matrix according to the phase distribution sequence;

[0012] Step S3: Constructing a position generation method according to the phase distribution sequence and the small sample time series data set;

[0013] Step S4: Generating random phase distribution information, and obtaining a model prediction training data set according to the random phase distribution information, the phase distribution transition matrix and the position generation method;

[0014] Step S5: Constructing an intelligent prediction model according to the model prediction training data set, pre-training the intelligent prediction model to update the model parameters, and finally generating a target prediction result according to the user input, the intelligent prediction model after updating the model parameters.

[0015] Further, the step S1 comprises:

[0016] Step S101: Extracting a target small sample time series data set, denoted as X(t)={X1(t),X2(t),...,X k (t),...,X K (t)}, wherein X represents a single time series data; k is a data sequence number, k=1,2,...,K; t is a time series data timestamp, the value range of t is (0,T]; T is the timestamp of the last frame of time series data;

[0017] Step S102: Constructing a grouping sequence according to the small sample time series data set X(t), denoted as X g , the distribution mode of X g is as follows: X g ={X1(t1),X1(t2),...,X1(T),[\n],X2(t1),X2(t2),...,X2(T),[\n],...,[\n],X k(t1),X k (t2),...,X k (T),[\n],...,

[0018] [\n],X K (t1),X K (t2),...,X K (T)}

[0019] wherein t1, t2,..., T represent phase distribution minimum variation time stamps, and [\n] represents a separator;

[0020] Step S103: constructing a phase distribution sequence according to the group sequence X g , denoted as N(t), the specific construction steps are as follows:

[0021] (1) According to the phase distribution in X g , the number of phase intervals is obtained, and the calculation method of the number of phase intervals is as follows:

[0022] y max = max(X g )

[0023] y min = min(X g )

[0024] M = -1 + log (1-r) (y max -y min ) × (1-r)

[0025] wherein y max is the maximum phase value, max(·) is a retrieval function that returns the maximum phase value in the phase distribution sequence, y min is the minimum phase value, min(·) is a retrieval function used to obtain the minimum phase value in the phase distribution sequence, M is the number of phase intervals, log(·) is a logarithmic function, and r is a phase span hyperparameter;

[0026] (2) Initialize the data sequence number variable k = 1;

[0027] (3) According to the number of phase intervals M, the kth phase distribution sequence is constructed, and the sequence construction is as follows:

[0028]

[0029] wherein N k (t) is the kth phase distribution sequence, m is the phase interval sequence number, count (N (t), m) represents the number of phase points in phase interval m in the kth phase distribution sequence at time t, count (·) is a counting function that returns the number of phase points in a certain interval in the snapshot at the current time, I m is a phase critical value;

[0030] (4) If k < K, let k = k + 1, and then return to step (3);

[0031] (5) Output all phase distribution sequences N (t) ;

[0032] Further, the step S2 comprises:

[0033] Step S201: Extract the number of phase intervals M according to the phase distribution sequence;

[0034] Step S202: Construct a phase transition state space according to the number of phase intervals M, which is specifically as follows:

[0035] Ω = {Ω1, Ω2,..., Ω m ..., Ω M}

[0036] Wherein, Ω is the state space of all phases; Ω m represents the state of phase m in the snapshot;

[0037] Step S203: Construct a phase distribution transition matrix Q according to the phase transition state space Ω, and the size of Q is M × M;

[0038] Step S204: Initialize each element in Q, and the initial value is 0;

[0039] Step S205: Initialize the phase interval number m, let m = 1;

[0040] Step S206: Use thread m to retrieve all K N m (t), construct a transition case tuple NEXT, and the structure of NEXT is specifically as follows:

[0041]

[0042]

[0043]

[0044]

[0045]

[0046] Wherein, t a represents the previous minimum change timestamp at time t b , t z represents the previous minimum change timestamp at time T;

[0047] Further, the structure of the phase distribution transfer matrix Q in step S203 is as follows:

[0048]

[0049] Step S207: Calculate the transition probability of the phase interval m. The calculation method is as follows:

[0050]

[0051] where, is the transition probability out of phase m; mcount + (·) is the function for calculating the out-transition situation, traversing the NEXT tuple, counting and returning the number of combinations that satisfy ; is the transition probability into phase m; mcount - (·) is the function for calculating the in-transition situation, traversing the NEXT tuple, counting and returning the number of combinations that satisfy ; P m is the internal retention probability of phase m; mcount(·) is the function for calculating the internal retention situation, traversing the NEXT tuple, counting and returning the number of combinations that satisfy ;

[0052] Step S208: Assign the value corresponding to the m-th row and the m-th column in Q as P m ; Assign the value corresponding to the m-th row and the m - 1-th column in Q as If m - 1 = 0, no assignment is made; assign the value corresponding to the m-th row and the m + 1-th column in Q as If m = M, no assignment is made;

[0053] Step S209: If m < M, let m = m + 1, then return to step S206. When m = M, enter step S210;

[0054] Step S210: Output the phase distribution transfer matrix Q.

[0055] Further, step S3 includes:

[0056] Step S301: Construct the sample data of the position generation method according to the phase distribution sequence N(t) and the small-sample time series data set. The sample data of the position generation method is specifically as follows:

[0057]

[0058] where, S is the sample data of the position generation method; represents N in the m-th phase interval mthe position coordinate data corresponding to the t) elements;

[0059] Step S302: constructing the position generation method according to the position generation method sample data.

[0060] In the step S302, the position generation method is specifically:

[0061]

[0062] I = sigmoid(W m *N(t) + b)

[0063] wherein, top(·) is a position selection function, receiving the position distribution vector I and the distribution number N m (t) at the phase interval m, and then returning the subscripts corresponding to the first N m (t) values in I from large to small in array form; sigmoid(·) is an activation function; W m is the position generation weight matrix corresponding to m, the dimension of W m is n x ×M, n x is the number of horizontal coordinates in the snapshot; * is a matrix point multiplication symbol; b is a bias vector; the above weight W m and bias b are iteratively updated by the position generation method sample data and the loss function according to claim 5, and the loss used is the mean square error loss function.

[0064] Further, the step S4 comprises:

[0065] Step S401: initializing the model prediction training data set R according to the phase distribution information N r (t1), and letting it be an empty set;

[0066] Step S401: initializing the variable j, and letting j = 1;

[0067] Step S402: generating a random phase distribution sequence using a function, and the specific generation process is as follows:

[0068] N r (t1) = {N r1 (t1), N r2 (t1),..., N rm (t1),..., N rM (t1)}

[0069] wherein, N r (t1) is a group of randomly generated phase distributions at t1; N rm (t1) is generated by rand(·), and rand(·) is a quantity generation function, and the generation result Nrm (t1)∈Z, Z = 0, 1, 2,..., M, and satisfies

[0070] Step S403: constructing a model prediction training data acquisition method according to the random phase distribution information N r (t1) and the phase distribution transition matrix Q;

[0071] The model prediction training data acquisition method in the step S403 is specifically as follows:

[0072] (1) initializing a variable t, t = t1, wherein t b -t a = t b+1 -t a+1 ; t b is the next adjacent time stamp of t a , and b = a + 1;

[0073] (2) initializing a phase data group N r (t), which contains an element N r (t1);

[0074] (3) constructing a next time phase distribution information calculation method according to the random phase distribution information N r (t1) and the phase distribution transition matrix Q, which is specifically as follows:

[0075] N r (t b ) = thr(Q·N r (t a ))

[0076] Wherein, N r (t b ) is the next time phase distribution information of t a ; thr(·) is a threshold activation function, which receives and traverses the input phase distribution information, judges the decimal part of each element value, if the decimal part of the element is greater than or equal to θ, the decimal part of the remaining element is added to the element, if the decimal part of the element is less than θ, the decimal part of the element is subtracted; θ is a threshold parameter; N r (t a ) is the last time phase distribution information of t b ;

[0077] (4) calculating the next time phase distribution information according to the next time phase distribution information calculation method and N r (t);

[0078] (5) inserting the next time phase distribution information into the data group N r (t);

[0079] (6) the following is determined:

[0080]

[0081] (7) the N r (t) is outputted, wherein the position generation method in claim 6 is performed on each element in the data group respectively j (t) = {D j (t1), D j (t2),..., D j (T), [\n]}.

[0082] Step S404: the model prediction training data acquisition method is performed to acquire the data group {D j (t1), D j (t2),..., D j (T), [\n]}.

[0083] wherein D j (t) represents a data snapshot located in the jth data batch at the tth time point;

[0084] Step S405: the splicing operation is performed, and the specific process is as follows:

[0085]

[0086] wherein is a data splicing operator;

[0087] Step S406: the size relationship between j and J is determined:

[0088]

[0089] wherein J is the number of batches of the model prediction training data;

[0090] Step S407: according to the above construction process, the model prediction training data group TRN is acquired, and the structure of TRN is as follows:

[0091] TRN = {D1(t1), D1(t2),..., D1(T), [\n], D2(t1), D2(t2),..., D2(T), [\n],..., [\n], D j (t1), D j (t2),..., D j (T),

[0092] [\n],..., [\n], D J (t1), D J(t2),...,D J (T)}

[0093] Where j = 1, 2, ..., J.

[0094] Furthermore, step S5 includes:

[0095] Step S501: Construct an intelligent prediction model M based on the model prediction training data set R;

[0096] The input terminal of the intelligent prediction model M serves as the input terminal of the user input embedding model, receiving user input information; the output terminal of the user input embedding model is connected to the input terminal of the initial phase transformation model; the output terminal of the initial phase transformation model is connected to the input terminal of the phase mixing sequence embedding model; the output terminal of the phase mixing sequence embedding model is connected to the input terminal of the Transformer module; the input terminal of the Transformer module serves as the input terminal of the first layer normalization module; the output terminal of the first layer normalization module is connected to the input terminal of the mask self-attention module; the output terminal of the mask self-attention module and the phase mixing sequence embedding model... The output terminals of the first layer are connected to the input terminal of the second layer normalization module; the output terminal of the second layer normalization module is connected to the input terminal of the feedforward neural network; the output terminal of the feedforward neural network, the output terminal of the mask self-attention module, and the output terminal of the phase mixing sequence embedding model are collectively used as the output terminal of the Transformer module; the output terminal of the Transformer module is connected to the input terminal of the next Transformer module; the output terminal of the nth Transformer module is connected to the input terminal of the final layer normalization module; the output terminal of the final layer normalization module is used as the output terminal of the intelligent prediction model to output the target prediction result.

[0097] Step S502: Update the corresponding parameter W in the intelligent prediction model based on the model prediction training data set R and the intelligent prediction model M;

[0098] Step S503: Based on the updated intelligent prediction model M with parameter W... * Based on user input, generate target prediction results.

[0099] The beneficial effects of this invention include:

[0100] (1) The small sample time series data extraction and processing method proposed in this invention constructs a reasonable data grouping sequence, which enables more direct acquisition of phase data, and then reasonably divides the phase interval, reducing the dimension of the phase transition state space; in addition, it outputs the phase distribution of each dimension in the random process, providing accurate data support for the construction of the phase distribution transition matrix, thereby improving the quality of the generated data.

[0101] (2) The phase distribution transition matrix constructed by the application adopts a quasi-birth-and-death processing mode with the minimum time variation range as the standard, can avoid the complex transition matrix construction problem, decomposes the phase transition process of multiple parallel conditions into limited and simple action combinations, greatly reduces the construction difficulty of the state transition matrix, simultaneously reduces the data distribution complexity in the state space, and further significantly simplifies the calculation process of the phase distribution state transition, effectively accelerates the calculation speed, and saves the cost of calculation resources;

[0102] (3) The position generation method proposed by the application utilizes the standard supervised learning idea, ensures the accuracy of the position generation calculation, can reasonably calculate the position distribution condition from the phase distribution condition, and accelerates the calculation speed through the parallel mode, so that the generated current time data has high usability;

[0103] (4) The application combines the phase distribution transition matrix and the position generation method, can generate a large batch of model prediction training data in a short time according to small sample data and initial random data, can significantly accelerate the process of the training data acquisition link, save time cost, and effectively save personnel energy and reduce data inaccuracy caused by personnel misoperation during the generation process;

[0104] (5) The intelligent prediction model proposed by the application takes the phase hybrid embedding model as the input end, integrates several Transformer modules to form an "encoder+decoder" structure, has a large number of updateable parameters in the model, can support the model to accurately understand the potential relationship between time sequence elements; simultaneously, through small sample data, high-quality training data can be accurately expanded and generated, and the parameters are continuously updated through gradient back propagation in the training process, and finally the prediction performance can reach the precision.

[0105] (6) The intelligent prediction method described in the application integrates the continuous time Markov chain idea, can be applied to a variety of real scenes, such as audio generation, video generation, queuing problems and a series of continuous random processes conforming to the Markov property, has high universality; and can adapt to the limitation brought by the small sample scene, and can ensure good usability in real scenes;

[0106] The other advantages, objects and features of the application will be explained in the subsequent specification to some extent, and will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the application. The objects and other advantages of the application can be achieved and obtained by the following specification and the preceding claims. BRIEF DESCRIPTION OF DRAWINGS

[0107] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0108] Figure 1 This is a schematic diagram of the process of the present invention;

[0109] Figure 2 This is a schematic diagram illustrating the audio timing data structure of the present invention;

[0110] Figure 3 This is a schematic diagram of the grouping sequence structure of the present invention;

[0111] Figure 4 This is a schematic diagram illustrating the tuple construction of the present invention;

[0112] Figure 5 This is a schematic diagram illustrating the working principle of the position generation method of the present invention;

[0113] Figure 6 This is a schematic diagram illustrating the generation of training data for the intelligent prediction model of this invention.

[0114] Figure 7 This is a diagram of the internal structure of the intelligent prediction model of this invention;

[0115] Figure 8 This is the functional interface of the intelligent prediction system of the present invention. Detailed Implementation

[0116] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the preferred embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0117] This invention provides a target prediction method for small sample data, such as... Figure 1 As shown, it includes the following steps:

[0118] Step S1: Extract the target small sample time series dataset, group it by time point, and construct the phase distribution sequence;

[0119] Step S2: Construct the phase distribution transition matrix based on the phase distribution sequence;

[0120] Step S3: Construct a location generation method based on the phase distribution sequence and a small sample time series dataset;

[0121] Step S4: Generate random phase distribution information. Based on the random phase distribution information, phase distribution transition matrix, and position generation method, obtain the model prediction training data set.

[0122] Step S5: According to the model prediction training data set, the intelligent prediction model is constructed, the intelligent prediction model is pre-trained to update the model parameters, and finally the target prediction result is generated according to the user input, the intelligent prediction model after updating the model parameters;

[0123] The specific steps of the above method will be further described through a specific embodiment.

[0124] In this embodiment, step S1 specifically includes the following steps:

[0125] Step S101: Extract the target small sample time series data set, denoted as X(t)={X1(t), X2(t),..., X k (t),..., X K (t)}, wherein X represents a single time series data; k is the data serial number, k=1, 2,..., K; t is the time stamp of the time series data, the value range of t is (0, T]; T is the time stamp of the last frame of time series data;

[0126] In step S101, first, the target small sample time series data set is selected, and in this embodiment, audio time series data is taken as an example. The composition of the audio time series data is shown in FIG. 1. The horizontal coordinate from left to right represents the frequency (Hz) arranged from small to large, and the value range of the horizontal coordinate is [0, 20000]; the vertical coordinate represents the audio intensity (dB) of a certain frequency band, and the greater the vertical coordinate value, the higher the intensity, and the value range of the vertical coordinate is [0, 200]; the data number of the small sample time series data set is K, K=1000; and the value of T is uniformly 60 seconds. Figure 2

[0127] Step S102: Grouping sequence is constructed according to the small sample time series data set X(t), denoted as X g , the distribution of X g is as follows: X g ={X1(t1), X1(t2),..., X1(T), [\n], X2(t1), X2(t2),..., X2(T), [\n],..., [\n], X k (t1), X k (t2),..., X k (T), [\n],...,

[0128] [\n], X K (t1), X K (t2),..., X K (T)}

[0129] Wherein t1, t2,..., T represent the phase distribution minimum variation time stamp, and [\n] represents a separator. ​

[0130] In step S102, X g is a specific data structure as shown in the following table: Figure 3

[0131] Step S103: According to the sequence X g , the phase distribution sequence is constructed, denoted as N(t), and the specific construction steps are as follows:

[0132] (1) According to the phase distribution in X g , the number of phase intervals is obtained, and the calculation method of the number of phase intervals is as follows:

[0133] y max = max(X g )

[0134] y min = min(X g )

[0135] M = -1 + log (1-r) (y max -y min ) × (1-r)

[0136] where y max is the maximum phase value, max(·) is a retrieval function that returns the maximum phase value in the phase distribution sequence, y min is the minimum phase value, min(·) is a retrieval function used to obtain the minimum phase value in the phase distribution sequence, M is the number of phase intervals, log(·) is a logarithmic function, and r is a phase span hyperparameter.

[0137] In step (1), the value of y max is 200; the value of y min is 0, and the value of the phase span hyperparameter r is set to 2, i.e., the division of the phase interval is:

[0138] {[0,2],[2,6],[6,14],...,[126,200]}

[0139] The value of M is calculated to be 7, and to consider the actual situation, the interval on the x-axis is divided into intervals with r = 2, and further subdivided.

[0140] (2) Initialize the data sequence number variable k = 1;

[0141] (3) According to the number of phase intervals M, the kth phase distribution sequence is constructed, and the sequence construction is as follows:

[0142]

[0143] where N​k (t) is the kth phase distribution sequence, m is the phase interval sequence number, representing the distribution number of phase interval m in the kth phase distribution sequence at time t, count(·) is a counting function, returning the number of phase points in a certain interval in the snapshot at the current time, I m is the phase critical value;

[0144] (4) If k

[0145] (5) Output all phase distribution sequences N(t);

[0146] In the above steps, 1000 phase distribution sequences are constructed, and an example of the phase distribution in one phase distribution sequence is shown as follows:

[0147] N(t) = {2, 6,..., 19,..., 3}

[0148] Step S2 specifically includes the following steps:

[0149] Step S201: Extract the number of phase intervals M according to the phase distribution sequence;

[0150] Step S202: Construct the phase transition state space according to the number of phase intervals M, which is specifically as follows:

[0151] Ω = {Ω1, Ω2,..., Ω m ..., Ω M}

[0152] Where Ω is the state space of all phases; Ω m represents the state of phase m in the snapshot;

[0153] Step S203: Construct the phase distribution transition matrix Q according to the phase transition state space Ω, and the size of Q is MxM;

[0154] Step S204: Initialize each element in Q, with an initial value of 0;

[0155] Step S205: Initialize the phase interval sequence number m, and let m = 1;

[0156] Step S206: Use thread m to retrieve all K N m (t), construct the transition tuple NEXT, and the structure of NEXT is specifically as follows:

[0157]

[0158]

[0159]

[0160]

[0161]

[0162] where t a represents the previous minimum variation timestamp at time t b represents the previous minimum variation timestamp at time T z represents the previous minimum variation timestamp at time T

[0163] In step S206, according to the actual data, the minimum variation time range between the two minimum variation timestamps is 0.5 seconds, so there are 119 pairs of data in the NEXT tuple, and an example of data in the NEXT tuple is shown in Table 2. Figure 4

[0164] Step S207: Calculate the transition probability of the phase interval m, and the calculation method is as follows:

[0165]

[0166] where, is the transition-out probability of phase m; mcount + (·) is a transition-out condition calculation function, which traverses the NEXT tuple, counts and returns the number of combinations satisfying ; is the transition-in probability of phase m; mcount - (·) is a transition-in condition calculation function, which traverses the NEXT tuple, counts and returns the number of combinations satisfying ; m is the internal retention probability of phase m; mcount(·) is an internal retention condition calculation function, which traverses the NEXT tuple, counts and returns the number of combinations satisfying ;

[0167] Step S208: Assign the value of P m to the value corresponding to the mth row and the mth column in Q; assign the value of to the value corresponding to the mth row and the m-1th column in Q; if m-1=0, do not assign; assign the value of to the value corresponding to the mth row and the m+1th column in Q; if m=M, do not assign.

[0168] Step S209: If m

[0169] Step S210: Output the phase distribution transition matrix Q.

[0170] The structure of the phase distribution transition matrix Q is as follows: ​

[0171]

[0172] In this step, the phase distribution transfer matrix obtained after the above calculation is as follows:

[0173]

[0174] Step S3 specifically includes the following steps:

[0175] Step S301: constructing position generation method sample data according to the phase distribution sequence N(t) and the small sample time series data set, and the position generation method sample data is specifically as follows:

[0176]

[0177] Wherein, S is the position generation method sample data; represents the position horizontal coordinate data corresponding to the N m (t) elements in the mth phase interval;

[0178] Step S302: constructing a position generation method according to the position generation method sample data;

[0179] In the step S302, the position generation method is specifically:

[0180]

[0181] I = sigmoid(W m *N(t) + b)

[0182] Wherein, top(·) is a position selection function, which receives the position distribution vector I and the distribution number N m (t) at the phase interval m, and then returns the subscripts corresponding to the first N m (t) values from large to small in I in array form; sigmoid(·) is an activation function; W m is the position generation weight matrix corresponding to m, and the dimension of W m is n x ×M, n x is the number of horizontal coordinates in the snapshot; * is a matrix dot multiplication symbol; b is a bias vector; the above weight W m and bias b are iteratively updated by the position generation method sample data and the loss function according to claim 5, and the loss used is the mean square error loss function;

[0183] In the above step, the number of horizontal coordinates in the snapshot n x = 60; after processing by the position generation method, the corresponding generated snapshot data can be obtained, and the working principle of the position generation method is as shown in Figure 5 .

[0184] Step S4 specifically comprises the following steps:

[0185] Step S401: according to the phase distribution information N r (t1), initialize the model prediction training data set R, and let it be an empty set;

[0186] Step S401: initialize the variable j, and let j=1;

[0187] Step S402: generate a random phase distribution sequence using a function, and the specific generation process is as follows:

[0188] N r (t1)={N r1 (t1),N r2 (t1),...,N rm (t1),...,N rM (t1)}

[0189] Wherein, N r (t1) is a set of randomly generated phase distribution at t1; N rm (t1) is generated by rand(·), rand(·) is a number generation function, and the generated result N rm (t1)∈Z, Z=0,1,2,...,M, and satisfies

[0190] Step S403: according to the random phase distribution information N r (t1) and the phase distribution transition matrix Q, construct a model prediction training data acquisition method;

[0191] The model prediction training data acquisition method in step S403 is specifically as follows:

[0192] (1) initialize the variable t, let t=t1, wherein, t b -t a =t b+1 -t a+1 ; t b is the next adjacent timestamp of t a , b=a+1;

[0193] In step (1), the value of t b -t a is 0.5 seconds;

[0194] (2) initialize the phase data set N r (t), which contains an element N r (t1);

[0195] (3) according to the random phase distribution information Nr (t1) and a phase distribution transfer matrix Q, a method for calculating phase distribution information at the next moment is constructed, and the method is specifically as follows:

[0196] N r (t b )=thr(Q·N r (t a ))

[0197] Wherein, N r (t b ) is the phase distribution information at the next moment of t a ; thr(·) is a threshold activation function, which receives and traverses the input phase distribution information, judges the decimal part of each element value, if the decimal part of the element is greater than or equal to θ, the decimal part of the remaining element is added to the element, if the decimal part of the element is less than θ, the decimal part of the element is subtracted; θ is a threshold parameter; N r (t a ) is the phase distribution information at the last moment of t b ;

[0198] In step (3), the value of the threshold parameter th in the threshold activation function thr(·) is set to 0.5;

[0199] (4) According to the method for calculating the phase distribution information at the next moment and N r (t), the phase distribution information at the next moment is calculated;

[0200] (5) The phase distribution information at the next moment is inserted into the data set N r (t);

[0201] (6) The following judgment is made:

[0202]

[0203] (7) The position generation method of claim 6 is executed for each element in the data set N r (t), and the model prediction training data D j (t) of this batch is outputted, that is, {D j (t1), D j (t2),..., D j (T), [\n]};

[0204] In the above steps, the generation process of the intelligent prediction model training data is as shown in Figure 6 ;

[0205] Step S404: The model prediction training data acquisition method is executed, and the data set {D j (t1), D j(t2),...,D j (t2),...,D

[0206] wherein, D j (t) represents the data snapshot located in the jth data batch at t time;

[0207] Step S405: perform splicing operation, as follows:

[0208]

[0209] wherein, is a data splicing operator;

[0210] Step S406: judge the size relationship between j and J:

[0211]

[0212] wherein, J is the batch number of model prediction training data;

[0213] Step S407: according to the above construction process, obtain the model prediction training data set TRN, the structure of TRN is as follows:

[0214] TRN={D1(t1),D1(t2),...,D1(T),[\n],D2(t1),D2(t2),...,D2(T),[\n],...,[\n],D j (t1),D j (t2),...,D j (T),

[0215] [\n],...,[\n],D J (t1),D J (t2),...,D J (T)}

[0216] wherein, j=1,2,...,J;

[0217] In this step, the model prediction training data set R obtained by processing contains 10,000 groups of data (J=10,000) in total, containing 1,200,000 pieces of phase distribution information;

[0218] Step S5 specifically includes the following steps:

[0219] Step S501: according to the model prediction training data set R, construct an intelligent prediction model M;

[0220] The input end of the intelligent prediction model M in step S501 receives user input information as the input end of the user input embedding model; the output end of the user input embedding model is connected with the input end of the initial phase conversion model; the output end of the initial phase conversion model is connected with the input end of the phase mixed sequence embedding model; the output end of the phase mixed sequence embedding model is connected with the input end of the Transformer module; the input end of the Transformer module is the input end of the first layer normalization module; the output end of the first layer normalization module is connected with the input end of the mask self-attention module; the output end of the mask self-attention module and the output end of the phase mixed sequence embedding model are connected with the input end of the second layer normalization module; the output end of the second layer normalization module is connected with the input end of the feedforward neural network; the output end of the feedforward neural network, the output end of the mask self-attention module and the output end of the phase mixed sequence embedding model are collectively the output end of the Transformer module; the output end of the Transformer module is connected with the input end of the next Transformer module; the output end of the nth Transformer module is connected with the input end of the final layer normalization module; the output end of the final layer normalization module is the output end of the intelligent prediction model, and outputs the target prediction result.

[0221] The value of n is set to 24, and the internal structure of the intelligent prediction model M is as shown in Figure 7

[0222] Step S502: updating the corresponding parameters W in the intelligent prediction model according to the model prediction training data set R and the intelligent prediction model M;

[0223] Step S503: generating a target prediction result according to the intelligent prediction model M * after updating the parameters W and user input;

[0224] In this embodiment, the function interface of the small sample-oriented intelligent prediction system is as shown in Figure 8 The user input information requires to generate a cheerful campus song, and the intelligent prediction model M * receives the user input information, generates a prediction result in the form of audio and returns it to the user, and the generated result meets the user's requirements.

[0225] ​It should be understood that each part of the present application can be realized by hardware, software, firmware or their combination. In the above-mentioned embodiments, a plurality of steps or methods can be realized by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if realized by hardware, and as in another embodiment, it can be realized by any one or their combination of the following technologies known in the art: discrete logic circuit with logic gate circuit for implementing logic function on data signal, application specific integrated circuit with suitable combination logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) and the like.

[0226] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiment method can be completed by a program instructing the relevant hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0227] In addition, each functional unit in each embodiment of the present application can be integrated in one processing module, or each unit can exist physically alone, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0228] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0229] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the purpose and scope of the present application, and they should be covered in the scope of the claims of the present application.

Claims

1. A target prediction method for small sample data, characterized in that: Comprising the following steps: Step S1: extracting a target small sample time series dataset, the dataset comprising audio time series data or video time series data, grouping by time, constructing a phase distribution sequence; Step S2: constructing a phase distribution transition matrix according to the phase distribution sequence; Step S3: constructing a position generation method according to the phase distribution sequence and the small sample time series dataset; Step S4: generating random phase distribution information, obtaining a model prediction training data set according to the random phase distribution information, the phase distribution transition matrix and the position generation method; the step S4 comprises: Step S401: According to the phase distribution information N r (t1), initialize the model prediction training data set R as an empty set; Step S401: initializing a variable j, j=1; Step S402: generating a random phase distribution sequence using a function, the specific generation process being as follows: N r (t1)={N r1 (t1), N r2 (t1),..., N rm (t1),..., N rM (t1)} wherein N r (t1) is a set of randomly generated phase distributions at time t1; N rm (t1) is generated by rand(·), which is a number generating function, and the generated result , and satisfies ; Step S403: obtaining the model prediction training data according to the random phase distribution information N r (t1) and the phase distribution transfer matrix Q, to construct a model prediction training data obtaining method; the model prediction training data obtaining method in step S403 is specifically as follows: (1) initialize variable t, let t = t1, wherein t b -t a = t b+1 -t a+1 ; t b is the next adjacent timestamp of t a , b = a + 1; (2) initializing the phase data set N r (t), which contains one element N r (t1), N r (t1) denotes the t1th random phase distribution information; (3) According to the random phase distribution information N r (t1) and the phase distribution transfer matrix Q, the phase distribution information calculation method at the next moment is constructed, which is shown as follows: N r (t b )=thr(Q·N r (t a )) wherein N r (t b ) is the phase distribution information at time t a ; thr(·) is a threshold activation function that receives and iterates the input phase distribution information, judges the decimal part of each element value, and if the decimal part of the element is greater than or equal to θ, adds the decimal part of the remaining elements to the element, and if the decimal part of the element is less than θ, subtracts the decimal part of the element; θ is a threshold parameter; N r (t a ) is the phase distribution information at the previous time t b ; (4) The next time phase distribution information is calculated according to the method and N r (t), the next time phase distribution information is calculated (5) Insertion of next time phase distribution information into data set N r (t); (6) The following judgment is made: (7) p-N r (t) performing the position generation method on each element of the data set separately, outputting the batch of model predictions for the training data ; Step S404: execute the model prediction training data acquisition method to acquire the data set ​ wherein D j (t) represents a data snapshot located at the jth data batch at time t; Step S405: performing a splicing operation, which is specifically as follows: ; wherein ; Step S406: judging the size relationship between j and J: Wherein, J is the batch number of the model prediction training data; Step S407: obtaining a model prediction training data set TRN according to the construction process of steps S401 to S406, the structure of TRN being as follows: Wherein, j=1, 2,..., J; Step S5: constructing an intelligent prediction model according to the model prediction training data set, pre-training the intelligent prediction model to update the model parameters, and finally generating a target audio or video prediction result according to the user input, the intelligent prediction model after updating the model parameters.

2. The target prediction method for small sample data according to claim 1, characterized in that: The step S1 comprises: Step S101: Extract the target small sample time series dataset, denoted as X(t) = {X1(t), X2(t),..., X k (t),...,X K (t)}, wherein X represents a single time series data; k is the data sequence number, k = 1, 2,..., K; t is the time series data timestamp, the value range of t is (0, T]; T is the last frame of time series data timestamp; Step S102: Construct a grouping sequence according to the small sample time series dataset X(t), denoted as X g , X g is distributed in the following manner: wherein t1, t2,..., T represent the minimum variation time stamps of the phase distribution, ; Step S103: Constructing a phase distribution sequence, denoted as N(t), according to the sequence X of groups g The specific construction steps are as follows: (1) According to X g The number of phase intervals is calculated according to the distribution of the median phase as follows: y max =max(X g ) y min = min(X g ) M = -1 + log (1-r) (y max -y min ) x (1 - r) where y max is the phase maximum, max(·) is a retrieval function that returns the maximum phase value in the phase distribution sequence, y min is the phase minimum, min(·) is a retrieval function that is used to obtain the minimum phase value in the phase distribution sequence, M is the number of phase bins, log(·) is a logarithm function, and r is a phase span hyperparameter; (2) initializing a data sequence number variable k=1; (3) constructing the kth phase distribution sequence according to the number of phase intervals M, the sequence construction being specifically as follows: N k (t)={ , ,..., ,..., } = count(I m , I m+1 ) I m = where N k (t) is the kth phase distribution sequence, m is the phase interval number, represents the distribution number of phase interval m in the kth phase distribution sequence at time t, count(·) is the counting function, which returns the number of phase points in a certain interval at the current time snapshot, I m is the phase threshold value; (4) If k (5) output all phase distribution sequences N(t).

3. The target prediction method for small sample data according to claim 1, characterized in that: The step S2 comprises: Step S201: extracting the number of phase intervals M according to the phase distribution sequence; Step S202: constructing a phase transition state space according to the number of phase intervals M, which is specifically as follows: wherein ; Step S203: , construct a phase distribution transfer matrix Q, Q has a size of M x M; Step S204: initializing each element in Q, the initial value being 0; Step S205: initializing a phase interval sequence number m, m=1; Step S206: using thread m, retrieve all K N m (t), construct a transition case tuple NEXT, the structure of NEXT is as follows: NEXT={{ , }, { , },..., { , },..., { , }, … { , }, { , }, ..., { , }, ..., { , }, … { , }, { , }, ..., { , }, ..., { , }} wherein t a represents the previous minimum variation timestamp of time t b represents the previous minimum variation timestamp of time t z represents the previous minimum variation timestamp of time T Step S207: calculating the transition probability of the phase interval m, the calculation method being as follows: where, is the probability of a transition out of phase m; mcount + (·) is the transition out case counting function, iterating over the NEXT tuples, counting and returning the number of combinations that satisfy - = 1. is the probability of a transition into phase m; mcount - (·) is the transition in case counting function, iterating over the NEXT tuples, counting and returning the number of combinations that satisfy - = -1; P m is the probability of an internal stay in phase m; mcount(·) is the internal stay case counting function, iterating over the NEXT tuples, counting and returning the number of combinations that satisfy = = 1. Step S208: assign the value corresponding to the mth row and the mth column in Q as P m ; assign the value corresponding to the mth row and the m-1th column in Q as , if m-1=0, then do not assign; assign the value corresponding to the mth row and the m+1th column in Q as , if m=M, then do not assign; Step S209: if m Step S210: outputting the phase distribution transition matrix Q.

4. The target prediction method for small sample data according to claim 3, characterized in that: The structure of the phase distribution transition matrix Q is as follows: 。 5. The target prediction method for small sample data according to claim 1, characterized in that: The step S3 comprises: Step S301: constructing position generation method sample data according to the phase distribution sequence N(t) and the small sample time series dataset, the position generation method sample data being specifically as follows: S={{i 11 , i 12 ,..., }, {i 21 , i 22 ,..., },..., {i m1 , i m2 ,..., },..., {i M1 , i M2 ,..., }} Wherein, S is a position generation method sample data; {i m1 , i m2 ,..., } represents the position horizontal coordinate data corresponding to the N m (t) elements in the mth phase interval; Step S302: constructing a position generation method according to the position generation method sample data.

6. The target prediction method for small sample data according to claim 1, characterized in that: In the step S302, the position generation method is specifically: {i m1 , i m2 ,..., }=top(I, N m (t)) where top(·) is a position selection function, receiving position distribution vector I and distribution number N at phase interval m m (t), and then returning the indices corresponding to the top N m (t) values in I in descending order as an array; sigmoid(·) is an activation function; W m is a position generation weight matrix corresponding to m, W m has a dimension of n x × M, n x is the number of horizontal coordinates in the snapshot; ; b is a bias vector; the above weight W m and bias b are iteratively updated by the position generation method and the loss function, and the loss is the mean square error loss function.

7. The target prediction method for small sample data according to claim 1, characterized in that: The step S5 comprises: Step S501: constructing an intelligent prediction model M according to the model prediction training data set R; Step S502: updating the corresponding parameters W in the intelligent prediction model according to the model prediction training data set R and the intelligent prediction model M; Step S503: generate the target prediction result according to the updated parameter W and the user input. and the user input.

8. The target prediction method for small sample data of claim 7, wherein: The input end of the intelligent prediction model M is connected with the input end of the user input embedding model, receives user input information; the output end of the user input embedding model is connected with the input end of the initial phase conversion model; the output end of the initial phase conversion model is connected with the input end of the phase mixed sequence embedding model; the output end of the phase mixed sequence embedding model is connected with the input end of the Transformer module; the input end of the Transformer module is connected with the input end of the first layer normalization module; the output end of the first layer normalization module is connected with the input end of the mask self-attention module; the output end of the mask self-attention module and the output end of the phase mixed sequence embedding model are connected with the input end of the second layer normalization module; the output end of the second layer normalization module is connected with the input end of the feedforward neural network; the output end of the feedforward neural network, the output end of the mask self-attention module and the output end of the phase mixed sequence embedding model are connected with the output end of the Transformer module; the output end of the Transformer module is connected with the input end of the next Transformer module; the output end of the nth Transformer module is connected with the input end of the final layer normalization module; the output end of the final layer normalization module is connected with the output end of the intelligent prediction model, and outputs the target prediction result.

Citation Information

Patent Citations

  • Transaction time prediction method and device

    CN114519461A

  • New load small sample identification method based on MAML

    CN115687902A