Target prediction method for small sample data

By constructing phase distribution sequences and transfer matrices, combined with position generation methods, the problem of obtaining training data in small sample scenarios is solved, and high-precision intelligent prediction is achieved, which is suitable for a variety of random processes.

CN119829906AActive Publication Date: 2025-04-15CHENGDU MINGTU TECH CO LTD

Patent Information

Application Number
CN202411914443.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-15
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

In real scenarios, the process of obtaining a large number of training samples that comply with the legal regulations to train large models takes a lot of time and resources, especially in small sample scenarios, it is difficult to achieve high-precision intelligent prediction.

Method used

By extracting the target small sample timing data set, phase distribution sequence and phase distribution transfer matrix are constructed, combined with position generation methods, large-scale high-quality training data are quickly generated, and intelligent prediction models are constructed to achieve high-precision prediction.

Benefits of technology

In small sample scenarios, the time cost and resource consumption of training data acquisition are significantly reduced, the accuracy and efficiency of intelligent prediction are improved, and it is suitable for a variety of continuous random processes that conform to Markov properties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829906A_ABST
    Figure CN119829906A_ABST
Patent Text Reader

Abstract

The invention discloses a target prediction method for small sample data, and the method comprises the steps: extracting a target small sample time sequence data set, taking moments as groups, constructing a phase distribution sequence, and constructing a phase distribution transfer matrix; constructing a position generation method according to the phase distribution sequence and the small sample time sequence data set; then generating random phase distribution information by the system, and rapidly obtaining a large-scale model prediction training data set in combination with a phase distribution transfer matrix and a position generation method; finally, according to the model prediction training data set, an intelligent prediction model is constructed, model parameters are updated by pre-training the intelligent prediction model, and target intelligent prediction oriented to small sample data is achieved. The method can effectively solve the problem of state transition between adjacent moments, further generates large-scale high-quality training data, remarkably improves the accuracy of an intelligent prediction model, and solves the problem of audio and video generation in a real scene such as a small sample scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of data processing technology and artificial intelligence, and in particular to a target prediction method for small sample data. Background Art

[0002] Most real systems are inherently random. Significant progress has been made in the analysis, optimization, and design of stochastic systems, and they have 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 queuing systems, and order statistics of multidimensional random variables. On the other hand, the above complex stochastic 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 in order to study and process complex stochastic 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 model training samples are constructed through manual search methods, it will cost a lot of manpower and time. To avoid such problems, it is usually necessary to use samples that conform to multidimensional random processes to train large models of random systems, thereby generating a large number of samples for training in a short period of time, reducing manpower and time investment.

[0004] The existing method is to use the Kronecker product to combine the two matrices into a larger matrix to construct a multidimensional Markov chain for the original random system. Specifically, the existing method constructs a Markov chain for the evolution of the random system by tracking the phase of each dimension in the random process. If there are many parallel processes in the system, a large number of states will be involved, resulting in a huge state space, leading to serious dimensionality curse problems, and tracking the transition of its phase becomes a very challenging task.

[0005] In theory, reinforcement learning algorithms can be used to estimate the transition rate matrix of a continuous-time Markov chain, learn strategies through frequent interactions with the environment, and automatically update corresponding information without prior knowledge. However, the implementation of such methods is complex and challenging, as they require interaction with a large number of samples to obtain accurate estimates, making them 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 there is no effective solution so far. Based on the above shortcomings, it is necessary to propose a target prediction method for small sample data to solve the state transition problem between adjacent moments in the small sample scenario, and finally achieve high-precision intelligent prediction. Summary of the invention

[0007] The purpose of the present invention is to provide a target prediction method for small sample data. With the help of the phase state transfer and position generation method proposed in the present invention, large-scale high-quality training data can be quickly generated through small sample data, thereby training the intelligent prediction model so that it can generate high-quality prediction results.

[0008] One of the purposes of the present invention is achieved through the following technical solutions:

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

[0010] Step S1: extract the target small sample time series data set, group it by time, and construct a phase distribution sequence;

[0011] Step S2: constructing a phase distribution transfer matrix according to the phase distribution sequence;

[0012] Step S3: constructing a position generation method based on the phase distribution sequence and the small sample time series data set;

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

[0014] Step S5: construct an intelligent prediction model based on the model prediction training data set, pre-train the intelligent prediction model to update the model parameters, and finally generate the target prediction result based on the intelligent prediction model after the user input and the updated model parameters.

[0015] Further, the step S1 comprises:

[0016] 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)}, where X represents a single time series data; k is the data sequence number, k = 1, 2, ..., K; t is the time series data timestamp, and the value range of t is (0, T]; T is the time series data timestamp of the last frame;

[0017] Step S102: construct a grouping sequence based on the small sample time series data set X(t), denoted as X g , X g The distribution of is as follows: 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] Among them, t1, t2, ..., T represent the timestamp of the minimum change of phase distribution, and [\n] represents the separator;

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

[0021] (1) According to X g The phase distribution in the middle phase is used to obtain the number of phase intervals. 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] Among them, y max is the maximum phase value, max(·) is a search function that returns the maximum phase value in the phase distribution sequence, y min is the minimum phase value, min(·) is the search function used to obtain the minimum phase value in the phase distribution sequence, M is the number of phase intervals, log(·) is the logarithmic function, and r is the phase span hyperparameter;

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

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

[0028]

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

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

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

[0032] Furthermore, the step S2 includes:

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

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

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

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

[0037] Step S203: Construct the phase distribution transition matrix Q according to the phase transition state space Ω. 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 serial number m, and let m = 1;

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

[0041]

[0042] …

[0043]

[0044] …

[0045]

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

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

[0048]

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

[0050]

[0051] where, is the transition probability out of phase m; mcount + (·) is the calculation function for the situation of transition out. Traverse the NEXT tuple, count and return the number of combinations that satisfy ; is the transition probability into phase m; mcount - (·) is the calculation function for the situation of transition in. Traverse the NEXT tuple, count and return the number of combinations that satisfy ; P m is the internal retention probability of phase m; mcount(·) is the calculation function for the internal retention situation. Traverse the NEXT tuple, count and return 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, then do not assign; Assign the value corresponding to the m-th row and the (m + 1)-th column in Q as If m = M, then do not assign;

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

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

[0055] Furthermore, 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 m(t) The positional coordinate data corresponding to the element;

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

[0060] In step S302, the location generation method is specifically as follows:

[0061]

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

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

[0064] Further, the step S4 comprises:

[0065] Step S401: According to the phase distribution information N r (t1), initialize the model prediction training data set R, setting it to an empty set;

[0066] Step S401: Initialize variable j, set j=1;

[0067] Step S402: Generate a random phase distribution sequence using a function. The specific generation process is as follows:

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

[0069] Among them, N r (t1) is a randomly generated phase distribution at time t1; N rm (t1) is generated by rand(·), which is a quantity generating function, generating the result Nrm (t1)∈Z, Z=0,1,2,...,M, and satisfies

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

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

[0072] (1) Initialize the variable t, let t = t1, where t b -t a =t b+1 -t a+1 ;t b Yes a The next adjacent timestamp of a, b = a + 1;

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

[0074] (3) According to the random phase distribution information N r (t1) and the phase distribution transfer matrix Q, a method for calculating the phase distribution information at the next moment is constructed, as shown below:

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

[0076] Among them, N r (t b ) is t a The phase distribution information of the next moment; thr(·) is the threshold activation function, which receives and traverses the input phase distribution information, determines the decimal part of each element value, and if the decimal part of the item is greater than or equal to θ, then the decimal part of the remaining items is added to the item; if the decimal part of the item is less than θ, then the decimal part of the item is subtracted; θ is the threshold parameter; N r (t a ) is t b The phase distribution information of the previous moment;

[0077] (4) According to the calculation method of the phase distribution information at the next moment and N r (t), calculate the phase distribution information at the next moment;

[0078] (5) Insert the phase distribution information at the next moment into data set N r (t);

[0079] (6) Make the following judgment:

[0080]

[0081] (7) for N r (t) Each element in the data set executes the position generation method described in claim 6 and outputs the model prediction training data D for this batch j (t) = {D j (t1),D j (t2),...,D j (T),[\n]}.

[0082] Step S404: Execute the model prediction training data acquisition method to obtain the data set {D j (t1),D j (t2),...,D j (T),[\n]},

[0083] Among them, D j (t) represents the data snapshot of the jth data batch at time t;

[0084] Step S405: performing a splicing operation, as shown below:

[0085]

[0086] in, It is the data concatenation operator;

[0087] Step S406: Determine the magnitude relationship between j and J:

[0088]

[0089] Where J is the number of batches of training data predicted by the model;

[0090] Step S407: According to the above construction process, obtain the model prediction training data group TRN, 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] Among them, j=1,2,...,J.

[0094] Further, the step S5 comprises:

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

[0096] The input end of the intelligent prediction model M is used as the input end of the user input embedding model to receive user input information; the output end of the user input embedding model is connected to the input end of the initial phase conversion model; the output end of the initial phase conversion model is connected to the input end of the phase mixed sequence embedding model; the output end of the phase mixed sequence embedding model is connected to the input end of the Transformer module; the input end of the Transformer module is used as the input end of the first layer normalization module; the output end of the first layer normalization module is connected to the input end of the masked self-attention module; the output end of the masked self-attention module and the phase mixed sequence embedding model The output end of the first layer is connected to the input end of the second layer normalization module; the output end of the second layer normalization module is connected to the input end of the feedforward neural network; the output end of the feedforward neural network, the output end of the masked self-attention module and the output end of the phase mixed sequence embedding model are used as the output end of the Transformer module; the output end of the Transformer module is connected to the input end of the next Transformer module; the output end of the nth Transformer module is connected to the input end of the final layer normalization module; the output end of the final layer normalization module is used as the output end of the intelligent prediction model to output the target prediction result.

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

[0098] Step S503: Intelligent prediction model M after updating parameter W * and user input to generate target prediction results.

[0099] The beneficial effects of the present invention include:

[0100] (1) The small sample time series data extraction and processing method proposed in the present invention constructs a reasonable data grouping sequence, so that the phase data can be obtained more directly, and then the phase interval is reasonably divided, reducing the dimension of the phase transfer state space; in addition, the phase distribution of each dimension in the random process is output, which provides accurate data support for the construction of the phase distribution transfer matrix, thereby improving the quality of the generated data;

[0101] (2) The phase distribution transfer matrix constructed by the present invention takes the minimum time variation range as the standard and adopts a quasi-birth-and-death processing method, which can avoid the complex transfer matrix construction problem and decompose the phase transfer process of multiple parallel situations into a finite and simple action combination, which greatly reduces the difficulty of constructing the state transfer matrix and also reduces the complexity of data distribution in the state space, thereby significantly simplifying the calculation process of the phase distribution state transfer, effectively speeding up the calculation speed and saving the cost of computing resources;

[0102] (3) The position generation method proposed in the present invention uses the standard supervised learning concept to ensure the accuracy of the position generation calculation, so that the position distribution can be reasonably inferred from the phase distribution, and the calculation speed is accelerated by parallel means to ensure that the generated current time data has high availability;

[0103] (4) The present invention combines the phase distribution transfer matrix and the position generation method, and can generate a large batch of model prediction training data in a short time based on small sample data and initial random data, which can significantly speed up the process of training data acquisition and save time and cost. In addition, no manual intervention is required during the generation process, which effectively saves personnel energy and reduces data inaccuracy caused by personnel misoperation.

[0104] (5) The intelligent prediction model proposed in the present invention uses the phase hybrid embedding model as the input end and integrates several Transformer modules to form an "encoder + decoder" structure. The model has a large number of updateable parameters, which can support the model to accurately understand the potential relationship between the elements of the time series sequence; at the same time, it accurately expands and generates high-quality training data through small sample data, and continuously updates the parameters through gradient back propagation during the training process, which can ultimately achieve accurate prediction performance.

[0105] (6) The intelligent prediction method of the present invention incorporates the idea of ​​continuous-time Markov chain and can be applied to a variety of real scenarios, such as audio generation, video generation, queuing problems, and other continuous random processes that conform to Markov properties. It has high versatility and can adapt to the limitations brought by small sample scenarios, and can ensure good usability in real scenarios.

[0106] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description and the preceding claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0107] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

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

[0109] Figure 2 A schematic diagram of the audio timing data structure of the present invention;

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

[0111] Figure 4 It is a schematic diagram of the structure of the tuple of the present invention;

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

[0113] Figure 6 A schematic diagram of training data generation for the intelligent prediction model of the present invention;

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

[0115] Figure 8 It is the functional interface of the intelligent prediction system of the present invention. DETAILED DESCRIPTION

[0116] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments are only for illustrating the present invention, rather than for limiting the protection scope of the present invention.

[0117] The present invention provides a target prediction method for small sample data, such as Figure 1 As shown, the following steps are included:

[0118] Step S1: extract the target small sample time series data set, group it by time, and construct a phase distribution sequence;

[0119] Step S2: constructing a phase distribution transfer matrix according to the phase distribution sequence;

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

[0121] Step S4: Generate random phase distribution information, and obtain a model prediction training data set according to the random phase distribution information, the phase distribution transfer matrix and the position generation method;

[0122] Step S5: construct an intelligent prediction model based on the model prediction training data set, pre-train the intelligent prediction model to update the model parameters, and finally generate a target prediction result based on the intelligent prediction model after the user input and the updated model parameters;

[0123] The specific steps of the above method will be further described below 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)}, where X represents a single time series data; k is the data sequence number, k = 1, 2, ..., K; t is the time series data timestamp, and the value range of t is (0, T]; T is the time series data timestamp of the last frame;

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

[0127] Step S102: construct a grouping sequence based on the small sample time series data set X(t), denoted as X g , X g The distribution of is as follows: 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] Among them, t1, t2, ..., T represent the timestamp of the minimum change of phase distribution, and [\n] represents the separator;

[0130] In step S102, X g The specific data composition is as follows Figure 3 As shown;

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

[0132] (1) According to X g The phase distribution in the middle phase is used to obtain the number of phase intervals. 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] Among them, y max is the maximum phase value, max(·) is a search function that returns the maximum phase value in the phase distribution sequence, y min is the minimum phase value, min(·) is the search function used to obtain the minimum phase value in the phase distribution sequence, M is the number of phase intervals, log(·) is the logarithmic function, and r is the phase span hyperparameter;

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

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

[0139] The calculated value of M is 7. To take the actual situation into consideration, the interval of the x-axis is divided into intervals in the same way with r = 2, and further subdivided;

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

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

[0142]

[0143] Among them, Nk (t) is the k-th phase distribution sequence, and m is the phase interval serial number. represents the distribution quantity of the phase interval m in the k-th phase distribution sequence at time t. count(·) is a counting function that returns the distribution quantity of phase points in a certain interval in the snapshot at the current moment. I m is the phase critical value;

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

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

[0146] In the above steps, a total of 1000 phase distribution sequences are constructed. An example of the phase distribution in one phase distribution sequence is 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, specifically as follows:

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

[0152] Among them, Ω 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 Ω. The size of Q is M × M;

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

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

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

[0157]

[0158] …

[0159]

[0160] …

[0161]

[0162] Among them, t a represents the previous minimum change timestamp at time t b ; t z represents the previous minimum change timestamp at time T;

[0163] In step S206, according to the actual data situation, the minimum change time range between the two minimum change timestamps is 0.5 seconds. Therefore, there are 119 pairs of data in the NEXT tuple. An example of the data in the NEXT tuple is as Figure 4 shown;

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

[0165]

[0166] Among them, is the transition probability out of phase m; mcount + (·) is the calculation function for the transition situation. Traverse the NEXT tuple, count and return the number of combinations that satisfy ; is the transition probability into phase m; mcount - (·) is the calculation function for the incoming situation. Traverse the NEXT tuple, count and return the number of combinations that satisfy ; P m is the internal retention probability of phase m; mcount(·) is the calculation function for the internal retention situation. Traverse the NEXT tuple, count and return the number of combinations that satisfy ;

[0167] Step S208: Assign the value corresponding to the m-th row and m-th column in Q to P m ; Assign the value corresponding to the m-th row and (m - 1)-th column in Q to If m - 1 = 0, then do not assign; Assign the value corresponding to the m-th row and (m + 1)-th column in Q to If m = M, then do not assign;

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

[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. The position generation method sample data is specifically as follows:

[0176]

[0177] Among them, S is the sample data of the location generation method; Represents the N in the mth phase interval m (t) The positional coordinate data corresponding to the element;

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

[0179] In step S302, the location generation method is specifically as follows:

[0180]

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

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

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

[0184] Step S4 specifically includes the following steps:

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

[0186] Step S401: Initialize variable j, set j=1;

[0187] Step S402: Generate a random phase distribution sequence using a function. The specific generation process is as follows:

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

[0189] Among them, N r (t1) is a randomly generated phase distribution at time t1; N rm (t1) is generated by rand(·), which is a quantity generating function, generating the 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 transfer matrix Q, construct a model prediction training data acquisition method;

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

[0192] (1) Initialize the variable t, let t = t1, where t b -t a =t b+1 -t a+1 ;t b Yes a The next adjacent timestamp of a, b = a + 1;

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

[0194] (2) Initialize phase data group N r (t), which contains an element N r (t1);

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

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

[0197] Among them, N r (t b ) is t a The phase distribution information of the next moment; thr(·) is the threshold activation function, which receives and traverses the input phase distribution information, determines the decimal part of each element value, and if the decimal part of the item is greater than or equal to θ, then the decimal part of the remaining items is added to the item; if the decimal part of the item is less than θ, then the decimal part of the item is subtracted; θ is the threshold parameter; N r (t a ) is t b The phase distribution information of the previous moment;

[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 calculation method of the phase distribution information at the next moment and N r (t), calculate the phase distribution information at the next moment;

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

[0201] (6) Make the following judgment:

[0202]

[0203] (7) for N r (t) Each element in the data set executes the position generation method described in claim 6 and outputs the model prediction training data D for this batch j (t) = {D j (t1),D j (t2),...,D j (T),[\n]};

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

[0205] Step S404: Execute the model prediction training data acquisition method to obtain the data set {D j (t1),D j(t2),...,D j (T),[\n]},

[0206] Among them, D j (t) represents the data snapshot of the jth data batch at time t;

[0207] Step S405: performing a splicing operation, as shown below:

[0208]

[0209] in, It is the data concatenation operator;

[0210] Step S406: Determine the magnitude relationship between j and J:

[0211]

[0212] Where J is the number of batches of training data predicted by the model;

[0213] Step S407: According to the above construction process, obtain the model prediction training data group 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] Where, j = 1, 2, ..., J;

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

[0218] Step S5 specifically includes the following steps:

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

[0220] In step S501, the input end of the intelligent prediction model M is used as the input end of the user input embedding model to receive user input information; the output end of the user input embedding model is connected to the input end of the initial phase conversion model; the output end of the initial phase conversion model is connected to the input end of the phase mixing sequence embedding model; the output end of the phase mixing sequence embedding model is connected to the input end of the Transformer module; the input end of the Transformer module is used as the input end of the first layer normalization module; the output end of the first layer normalization module is connected to the input end of the masked self-attention module; the output end of the masked self-attention module and the phase mixing sequence The output end of the embedding model is commonly connected to the input end of the second layer normalization module; the output end of the second layer normalization module is connected to the input end of the feedforward neural network; the output end of the feedforward neural network, the output end of the masked self-attention module and the output end of the phase mixed sequence embedding model are commonly used as the output end of the Transformer module; the output end of the Transformer module is connected to the input end of the next Transformer module; the output end of the nth Transformer module is connected to the input end of the final layer normalization module; the output end of the final layer normalization module is used as the output end of the intelligent prediction model to output the target prediction result;

[0221] Set the value of n to 24, and the internal structure of the intelligent prediction model M is as follows: Figure 7 As shown;

[0222] Step S502: updating 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: Intelligent prediction model M after updating parameter W * and user input to generate target prediction results;

[0224] In this embodiment, the functional interface of the intelligent prediction system for small samples is as follows: Figure 8 As shown in the figure, the user inputs information to generate a cheerful campus song, and the intelligent prediction model M * After receiving user input information, the prediction result in audio form is generated and returned to the user, and the generated result meets the user's requirements.

[0225] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0226] A person skilled in the art may understand that all or part of the steps of the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0227] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may 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 noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A target prediction method for small sample data, characterized by: It includes the following steps: Step S1: Extract the target small-sample time series dataset, group by time, and construct a phase distribution sequence; Step S2: Construct a phase distribution transition matrix according to the phase distribution sequence; Step S3: Construct a position generation method according to the phase distribution sequence and the small-sample time series dataset; Step S4: Generate random phase distribution information, and obtain a model prediction training data group according to the random phase distribution information, the phase distribution transition matrix, and the position generation method; Step S5: Construct an intelligent prediction model according to the model prediction training data group, pre-train the intelligent prediction model to update the model parameters, and finally generate a target prediction result according to the user input and the intelligent prediction model with updated model parameters.

2. The target prediction method for small sample data according to claim 1, characterized in that: The said Step S1 includes: 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)}, where X represents a single time series data; k is the data sequence number, k = 1, 2, ..., K; t is the time series data timestamp, and the value range of t is (0, T]; T is the time series data timestamp of the last frame; Step S102: construct a grouping sequence based on the small sample time series data set X(t), denoted as X g , X g The distribution of is as follows: 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],...,[\n],X K (t1),X K (t2),...,X K (T)} Wherein, t1, t2,..., T represent the minimum change timestamps of the phase distribution, and [\n] represents a separator; Step S103: According to the grouping sequence X g , construct the phase distribution sequence, denoted as N(t), and the specific construction steps are as follows: (1) According to X g The phase distribution in the middle phase is used to obtain the number of phase intervals. The calculation method of the number of phase intervals is as follows: and max =max(X g ) y min =min(X g ) M=-1+log (1-r) (y max -y min )×(1-r) Among them, y max is the maximum phase value, max(·) is a search function that returns the maximum phase value in the phase distribution sequence, y min is the minimum phase value, min(·) is the search function used to obtain the minimum phase value in the phase distribution sequence, M is the number of phase intervals, log(·) is the logarithmic function, and r is the phase span hyperparameter; (2) Initialize the data serial number variable k = 1; (3) Construct the k-th phase distribution sequence according to the number M of phase intervals. The specific construction of the sequence is as follows: Among them, N k (t) is the kth phase distribution sequence, m is the phase interval number, represents the number of phase intervals 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 current snapshot. I m is the phase critical value; (4) If k < K, then let k = k + 1, and then return to step (3); (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 said Step S2 includes: Step S201: Extract the number M of phase intervals according to the phase distribution sequence; Step S202: Construct a phase transition state space according to the number M of phase intervals, specifically as follows: Ω={Ω1,Ω2,...,Ω m ,...,Oh M } Among them, Ω is the state space of all phases; Ω m represents the state of phase m in the snapshot; Step S203: Construct a phase distribution transition matrix Q according to the phase transition state space Ω. The size of Q is M×M; Step S204: Initialize each element in Q, and the initial value is 0; Step S205: Initialize the phase interval serial number m, and let m = 1; Step S206: Using thread m, retrieve all K N m (t), construct the transfer situation tuple NEXT, the structure of NEXT is as follows: … … Among them, t a Represents t b The previous minimum change timestamp of the moment, t z Represents the previous minimum change timestamp at time T; Step S207: Calculate the transition probability of the phase interval m. The calculation method is as follows: in, is the probability of exiting phase m; mcount + (·) is the transfer-out calculation function, which traverses the NEXT tuple, counts and returns the number of rows that meet the requirements. The number of combinations; is the transition probability of phase m; mcount - (·) is the transfer situation calculation function, traversing the NEXT tuple, counting and returning the satisfied The number of combinations; P m is the internal retention probability of phase m; mcount(·) is the internal retention calculation function, which traverses the NEXT tuple, counts and returns the values ​​that satisfy The number of combinations; Step S208: Assign P to the value corresponding to the mth row and the mth column in Q m ; The value corresponding to the mth row and m-1th column in Q is assigned as If m-1=0, no allocation is made; the value corresponding to the mth row and the m+1th column in Q is allocated as If m = M, no allocation is made; Step S209: If m < M, then let m = m + 1, and then return to step S206. When m = M, enter step S210; Step S210: Output the phase distribution transition matrix Q.

4. The method for constructing a phase distribution transfer matrix 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 said Step S3 includes: Step S301: Construct sample data of the position generation method according to the phase distribution sequence N(t) and the small-sample time series dataset. The sample data of the position generation method is specifically as follows: Among them, S is the sample data of the location generation method; Represents the N in the mth phase interval m (t) The positional coordinate data corresponding to the element; Step S302: Construct a position generation method according to the sample data of the position generation method.

6. The target prediction method for small sample data according to claim 5, characterized in that: In the said Step S302, the position generation method is specifically: I=sigmoid(W m *N(t)+b) Where top(·) is the position selection function, receiving the position distribution vector I and the distribution number N at the phase interval m m (t), and then the first N in I from large to small m The subscripts corresponding to the (t) values ​​are returned in array form; sigmoid(·) is the activation function; W m Generate a weight matrix for the position corresponding to m, W m The dimension is n x ×M,n x is the number of horizontal coordinates in the snapshot; * is the matrix dot multiplication symbol; b is the bias vector; the above weight W m The and bias b are iteratively updated using the sample data and loss function of the position generation method described in claim 5, and the loss used is the mean square error loss function.

7. The target prediction method for small sample data according to claim 1, characterized in that: The said Step S4 includes: Step S401: According to the phase distribution information N r (t1), initialize the model prediction training data set R, setting it to an empty set; Step S401: Initialize the variable j, and let j = 1; Step S402: Use a function to generate a random phase distribution sequence. The specific generation process is as follows: N r (t1)={N r1 (t1),N r2 (t1),...,N rm (t1),...,N rM (t1)} Among them, N r (t1) is a randomly generated phase distribution at time t1; N rm (t1) is generated by rand(·), which is a quantity generating function, generating the result N rm (t1)∈Z, Z=0,1,2,...,M, and satisfies Step S403: According to the random phase distribution information N r (t1) and the phase distribution transfer matrix Q, construct a model prediction training data acquisition method; Step S404: Execute the model prediction training data acquisition method to obtain the data set {D j (t1),D j (t2),...,D j (T),[\n]}, Among them, D j (t) represents the data snapshot of the jth data batch at time t; Step S405: Perform a splicing operation, specifically as follows: in, It is the data concatenation operator; Step S406: Judge the size relationship between j and J: Wherein, J is the number of batches of the model prediction training data; Step S407: Obtain a model prediction training data group TRN according to the above construction process. The structure of TRN is as follows: 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), [\n],...,[\n],D J (t1),D J (t2),...,D J (T)} Wherein, j = 1, 2,..., J.

8. The target prediction method for small sample data according to claim 7, characterized in that: The method for obtaining the model prediction training data in the said Step S403 is specifically as follows: (1) Initialize the variable t, let t = t1, where t b -t a =t b+1 -t a+1 ;t b Yes a The next adjacent timestamp of a, b = a + 1; (2) Initialize phase data group N r (t), which contains an element N r (t1); (3) According to the random phase distribution information N r (t1) and the phase distribution transfer matrix Q, a method for calculating the phase distribution information at the next moment is constructed, as shown below: N r (t b )=thr(Q·N r (t a )) Among them, N r (t b ) is t a The phase distribution information of the next moment; thr(·) is the threshold activation function, which receives and traverses the input phase distribution information, determines the decimal part of each element value, and if the decimal part of the item is greater than or equal to θ, then the decimal part of the remaining items is added to the item; if the decimal part of the item is less than θ, then the decimal part of the item is subtracted; θ is the threshold parameter; N r (t a ) is t b The phase distribution information of the previous moment; (4) According to the calculation method of the phase distribution information at the next moment and N r (t), calculate the phase distribution information at the next moment; (5) Insert the phase distribution information at the next moment into data set N r (t); (6) Make the following judgment: (7) for N r (t) Each element in the data set executes the position generation method described in claim 6 and outputs the model prediction training data D for this batch j (t) = {D j (t1),D j (t2),...,D j (T),[\n]}.

9. The target prediction method for small sample data according to claim 1, characterized in that: The said Step S5 includes: Step S501: construct an intelligent prediction model M according to the model prediction training data set R; Step S502: updating 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: Intelligent prediction model M after updating parameter W * and user input to generate target prediction results.

10. The target prediction method for small sample data according to claim 9, characterized in that: The input end of the intelligent prediction model M is used as the input end of the user input embedding model to receive user input information; the output end of the user input embedding model is connected to the input end of the initial phase conversion model; the output end of the initial phase conversion model is connected to the input end of the phase mixed sequence embedding model; the output end of the phase mixed sequence embedding model is connected to the input end of the Transformer module; the input end of the Transformer module is used as the input end of the first layer normalization module; the output end of the first layer normalization module is connected to the input end of the masked self-attention module; the output end of the masked self-attention module and the phase mixed sequence embedding model The output end of the first layer is connected to the input end of the second layer normalization module; the output end of the second layer normalization module is connected to the input end of the feedforward neural network; the output end of the feedforward neural network, the output end of the masked self-attention module and the output end of the phase mixed sequence embedding model are used as the output end of the Transformer module; the output end of the Transformer module is connected to the input end of the next Transformer module; the output end of the nth Transformer module is connected to the input end of the final layer normalization module; the output end of the final layer normalization module is used as the output end of the intelligent prediction model to output 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

  • Small sample time sequence prediction method based on meta-learning framework

    CN117272040A

  • Efficient transformer for content-aware anomaly detection in event sequences

    US20230252139A1

Cited By

  • Hyper-parameter optimization method, system and equipment based on deep learning and storage medium

    CN120012881A

  • Hyperparameter Optimization Method, System, Device and Storage Medium Based on Deep Learning

    CN120012881B

  • Sample acquisition method and device, strategy determination method and device, equipment, medium and product

    CN120354135A