Method and apparatus for training target prediction model

By acquiring the association information and demand data of business objects, constructing training data and training an attention mechanism, the problem of low prediction accuracy in existing technologies is solved, and more accurate prediction of business demand and anomaly detection are achieved.

CN116432696BActive Publication Date: 2026-05-19CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD
Filing Date
2021-12-30
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies rely solely on time-varying patterns to predict business demand, resulting in low prediction accuracy.

Method used

By acquiring information on the relationships between business objects and other business objects, as well as connection information on business demand data, and historical and estimated business demand volumes, training data is constructed to train the initial prediction model based on an attention mechanism, learn attention weights, and improve prediction accuracy.

Benefits of technology

It improves the ability of prediction results to support decision-making and enhances the accuracy of anomaly detection in complex industrial systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116432696B_ABST
    Figure CN116432696B_ABST
Patent Text Reader

Abstract

The application provides a training method and device of a target prediction model, the method comprising: acquiring first association information between a business object and other business objects for a business type, and second association information between the business object and the other business objects for business demand data, and acquiring a historical business demand quantity and an estimated business demand quantity of the business object; and performing training on an initial prediction model based on an attention mechanism according to training data constructed by the first association information, the second association information, the historical business demand quantity and the estimated business demand quantity, to obtain the target prediction model. The application enables the model to finely mine the influence degree of different times, different business objects and different association pairs on a prediction result, improves the support capability of the prediction result for assisting decision-making, and improves the accuracy of anomaly detection in a complex industrial system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, and specifically relates to a training method and apparatus for a target prediction model, a method and apparatus for predicting business demand, electronic equipment, computer-readable storage media, and computer program products. Background Technology

[0002] With the continuous development of big data, predicting future business demand based on big data has become an important part of optimizing business models.

[0003] Currently, it is possible to predict the business demand of business objects based on deep learning models. Specifically, a neural network model with time series modeling capabilities can be used. This model can learn the changing patterns of business demand over time, so that the output business demand meets these changing patterns.

[0004] However, the inventors discovered during their research that the current solution involves a complex process of changing business demand data volume, and relying solely on time-varying patterns to predict business demand volume results in low prediction accuracy. Summary of the Invention

[0005] Based on this, the present invention provides a training scheme for a target prediction model and a scheme for predicting business demand, in order to solve the problem that the prediction accuracy is low when predicting business demand solely based on time variation patterns in related technologies.

[0006] The present invention also provides a training device for a target prediction model and a business demand prediction device to ensure the implementation and application of the above methods in practice.

[0007] This invention provides a method for training a target prediction model, the method comprising:

[0008] Obtain first association information between the business object and other business objects based on business type, and second association information between the business object and other business objects based on business demand data, as well as obtain the historical business demand volume and estimated business demand volume of the business object;

[0009] Based on the training data constructed from the first association information, the second association information, the historical business demand, and the estimated business demand, the initial prediction model is trained using an attention mechanism to obtain the target prediction model.

[0010] This invention provides a method for training a target prediction model, the method comprising:

[0011] Obtain the historical business demand volume of the business object to be predicted;

[0012] Input the historical business demand of the business object to be predicted into the target prediction model to obtain the business demand of the business object to be predicted.

[0013] The target prediction model is trained using the target prediction model training method.

[0014] This invention also provides a training apparatus for a target prediction model, the apparatus comprising:

[0015] The first acquisition module is used to acquire first association information between the business object and other business objects based on business type, and second association information between the business object and other business objects based on business demand data, as well as acquire the historical business demand volume and estimated business demand volume of the business object.

[0016] The training module is used to train the initial prediction model based on an attention mechanism using training data constructed from the first association information, the second association information, the historical business demand, and the estimated business demand, to obtain the target prediction model.

[0017] This invention also provides a business demand forecasting device, the device comprising:

[0018] The second acquisition module is used to input the historical business demand of the business object to be predicted into the target prediction model to obtain the business demand of the business object to be predicted.

[0019] The target prediction model is trained by the target prediction model training device.

[0020] This invention also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the above-described method.

[0021] This invention also provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by the processor of an electronic device, enables the electronic device to perform the above-described method.

[0022] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0023] In this embodiment of the invention, during the training of the initial prediction model based on an attention mechanism using training data constructed from first association information, second association information, historical business demand, and estimated business demand, the initial prediction model can learn attention weights by utilizing the first association information reflecting the association between business types of business objects and the second association information reflecting the association between business demand data of business objects. This enables the model to finely mine the degree of influence of different times, different business objects, and different associations on the prediction results, thereby improving the ability of the prediction results to support decision-making and enhancing the accuracy of anomaly detection in complex industrial systems. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart illustrating the steps of a training method for a target prediction model provided in an embodiment of the present invention.

[0026] Figure 2 This is an architecture diagram of a training method for a target prediction model provided in an embodiment of the present invention;

[0027] Figure 3 This is a flowchart illustrating the steps of a business demand forecasting method provided in an embodiment of the present invention;

[0028] Figure 4 This is a flowchart illustrating the specific steps of a training method for a target prediction model provided in an embodiment of the present invention.

[0029] Figure 5 This is an overall architecture diagram of a training method for a target prediction model provided in an embodiment of the present invention;

[0030] Figure 6 This is a structural block diagram of a prediction model provided in an embodiment of the present invention;

[0031] Figure 7 This is an architecture diagram of training parameters in a prediction model provided by an embodiment of the present invention;

[0032] Figure 8 This is a block diagram of a training device for a target prediction model provided in an embodiment of the present invention;

[0033] Figure 9 This is a block diagram of a business demand forecasting device provided in an embodiment of the present invention;

[0034] Figure 10 A logic block diagram of an electronic device according to an embodiment of this disclosure;

[0035] Figure 11 A logic block diagram of an electronic device according to another embodiment of this disclosure. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] This invention can be used in a wide variety of general-purpose or special-purpose computing environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor devices, distributed computing environments including any of the above devices, etc.

[0038] This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0039] Figure 1 This is a flowchart illustrating the steps of a training method for a target prediction model provided in an embodiment of the present invention, as follows: Figure 1 As shown, the method may include:

[0040] Step 101: Obtain the first association information between the business object and other business objects based on business type, and the second association information between the business object and other business objects based on business demand data, and obtain the historical business demand volume and estimated business demand volume of the business object.

[0041] The business object can be an individual, part, organization, or terminal device providing services. The business demand of the business object can reflect the estimated amount of business generated by the business object within a unit of time. In the scenario of predicting the business demand of the business object, by analyzing the historical business demand of the business object, the factors affecting the size of the business demand can be found. In addition to the change pattern over time, there are also the relationships between business objects. For example, if business object A has relationships with business object B and business object C, then the business demand of business object A will also change due to the influence of these relationships. In this embodiment of the invention, during the training of the prediction model for predicting the business demand of business objects, the model can be introduced to learn these two relationships based on an attention mechanism, so that the trained prediction model can output more accurate prediction results.

[0042] In this embodiment of the invention, the association between business objects can be specifically divided into two dimensions: the first association information between a business object and other business objects based on business type, and the second association information between a business object and other business objects based on business requirement data. That is, there is an association between business objects based on business type and business requirement data.

[0043] Specifically, refer to Figure 2 This diagram illustrates the architecture of a training method for a target prediction model provided by an embodiment of the present invention. The first association information 10 and the second association information 11 can exist in the form of a topology graph, that is, each business object in the topology graph can exist as a node. If there is an association between two business objects based on business type (such as belonging to the same business type), then a weighted edge can be created between the two business object nodes in the topology graph of the first association information 10. If there is an association between two business objects based on business requirement data (such as their business requirement data being similar), then a weighted edge can be created between the two business object nodes in the topology graph of the second association information 11. In the subsequent training process, the model can introduce an attention mechanism, and the attention mechanism calculation is implemented based on the weight of the edge between business objects to achieve the learning of the association relationship between business objects.

[0044] Furthermore, embodiments of the present invention can also obtain the historical and estimated business demand of business objects to construct training data. The training sample in the training data is S = (HM, x), where HM is the historical business demand of all business objects within a certain time range (e.g., one month), HM is an N×n dimensional matrix, N is the total number of business objects, and n is the number of time units within the time range (the number of days in one month, preferably 28 in the embodiments of the present invention); the i-th row of HM represents the historical business demand vector of business object di within the time range, i = 1, 2, ... N; x is the estimated business demand of all business objects on the Δ-th day in the future, x is an N×1 dimensional vector, where Δ is the prediction time interval, and the i-th row of x represents the estimated business demand of business object di on the Δ-th day in the future.

[0045] Step 102: Based on the training data constructed from the first association information, the second association information, the historical business demand, and the estimated business demand, train the initial prediction model using an attention mechanism to obtain the target prediction model.

[0046] The essence of the attention mechanism comes from the human visual attention mechanism, which is a brain signal processing mechanism unique to human vision. Human vision quickly scans the global image to obtain the target area that needs to be focused on, which is generally referred to as the focus of attention. Then, more attentional resources are invested in this area to obtain more detailed information about the target that needs to be focused on, while suppressing other useless information.

[0047] Therefore, the attention-based model is a network model built by simulating human attention mechanisms. Based on this attention mechanism, it captures the correlation between business objects, which can be considered attention weights. By assigning these attention weights to corresponding features, features applying the attention mechanism are obtained. Because these features include the correlation between business objects, subsequent estimations of business demand using these features are more accurate. Furthermore, the attention-based features extracted in this embodiment are based on an end-to-end attention mechanism model, reducing the application scenario's reliance on multiple models.

[0048] In this embodiment of the invention, reference is made to Figure 2In the process of training the initial prediction model based on the attention mechanism using training data constructed from the first association information 10, the second association information 11, historical business demand, and estimated business demand, the initial prediction model can be a multi-layer attention model. It learns attention weights by using the first association information reflecting the association between business types of business objects and the second association information reflecting the association between business demand data of business objects. This enables the model to finely explore the degree of influence of different times, different business objects, and different associations on the prediction results, and obtain the target prediction model.

[0049] In summary, the target prediction model training method provided by this embodiment of the invention, during the training of the initial prediction model based on an attention mechanism using training data constructed from first association information, second association information, historical business demand, and estimated business demand, allows the initial prediction model to learn attention weights by utilizing the first association information reflecting the business type association between business objects and the second association information reflecting the business demand data association between business objects. This enables the model to finely mine the degree of influence of different times, different business objects, and different associations on the prediction results, improving the ability of the prediction results to support decision-making and enhancing the accuracy of anomaly detection in complex industrial systems.

[0050] Figure 3 This is a flowchart illustrating the steps of a business demand forecasting method provided in an embodiment of the present invention, as follows: Figure 3 As shown, the method may include:

[0051] Step 201: Obtain the historical business demand of the business object to be predicted.

[0052] Step 202: Input the historical business demand of the business object to be predicted into the target prediction model to obtain the business demand of the business object to be predicted.

[0053] Among them, the target prediction model is based on Figure 1 The target prediction model is trained using the training method described above.

[0054] In the application scenario of this invention embodiment, the historical business demand of the business object to be predicted can be input into the trained target prediction model to obtain the future business demand of the business object to be predicted. The entire prediction process learns the correlation between business objects, making the output results more accurate.

[0055] In summary, the business demand prediction method provided by this invention, during the training of an initial prediction model based on an attention mechanism using training data constructed from first association information, second association information, historical business demand, and estimated business demand, allows the initial prediction model to learn attention weights by utilizing the first association information reflecting the business type association between business objects and the second association information reflecting the business demand data association between business objects. This enables the model to finely mine the degree of influence of different times, different business objects, and different associations on the prediction results, improving the ability of the prediction results to support decision-making and enhancing the accuracy of anomaly detection in complex industrial systems.

[0056] Figure 4 This is a flowchart illustrating the specific steps of a training method for a target prediction model provided in an embodiment of the present invention, as follows: Figure 4 As shown, the method may include:

[0057] Step 301: Obtain the first association information between the business object and other business objects based on the business type, and the second association information between the business object and other business objects based on the business demand data, and obtain the historical business demand volume and estimated business demand volume of the business object.

[0058] For details on this step, please refer to the relevant description of step 101 above, which will not be repeated here.

[0059] Optionally, step 301 may specifically include:

[0060] Sub-step 3011: Based on the business object, traverse the other business objects. If there is an association between the business type of the business object and the business types of other business objects, create an edge with a weight of 1 between the business object and the other business objects.

[0061] Sub-step 3012: After the traversal is completed, the first associated information is obtained.

[0062] Reference Figure 5 It shows an overall architecture diagram of a training method for a target prediction model provided by an embodiment of the present invention. Sub-steps 3011-3012 are a description of the acquisition process of the first associated information 10.

[0063] Specifically, the construction of the first association information and the weights of its edges includes: abstracting each business object as a node in the first topological graph, when business object d i and business object d j When there is a business type association (e.g., both belong to the same business type), then in business object d i and business object d jCreate an edge and set its weight to 1 to represent the business object d. i and business object d j There are business type associations, i≠j, i, j∈{1、2、…N}, N is the total number of business objects. By traversing each business object to create edges in the first topology graph, the first association information 10 can be obtained.

[0064] Optionally, step 301 may specifically include:

[0065] Sub-step 3013: Obtain the average historical business demand of the business object and the other business objects.

[0066] Sub-step 3014: Based on the business object, traverse the other business objects. If the similarity between the average historical business demand of the business object and the average historical business demand of other business objects is greater than a preset threshold, create an edge with a weight of 1 between the business object and the other business objects.

[0067] Sub-step 3015: After the traversal is completed, the second association information is obtained.

[0068] Specifically, refer to Figure 5 Sub-steps 3013-3015 describe the process of obtaining the second association information 11. The construction of the second association information and the weights of its edges includes: abstracting each business object as a node in the second topology graph; since the second association information 11 needs to capture the associations between business objects regarding business demand data, the historical business demand volume of the business objects can be obtained first, and then the historical business demand volume can be divided according to a time unit (e.g., month) to obtain dv. i 1. dv i 2、…dv ij ...dv i m; where dv i 1 represents the business object d i Historical business demand in the first time unit, dv i 2 is the business object d i Historical business demand in the second time unit, dv ij For business object d i In the j Historical business demand per unit of time. j =1, 2, ..., m, where m is the total number of time units; dv ij =[v ij (1),v ij (2),…v ij (k)…v ij (n)];When the time unit is months, vij (k) represents the business object d i The number of petitions requested on day k in month j, where k = 1, 2, ..., n, and n is the total number of days in a month; dv i m is the business object d i The historical business demand in month m; considering that February is a non-leap month with only 28 days, then n = 28.

[0069] Furthermore, with the time unit being months, the average historical business demand for each business object is calculated based on the segmented historical business demand, thus obtaining the dv. i =[v i 1,v i 2,…v i k,…v i n], where v i 1 represents the business object d i The average historical business demand on day 1 within m months, v i 2 is the business object d i The average historical business demand on the second day within m months, v i k is the business object d i The average historical business demand on day k within m months, v i k = (v i 1(k)+v i 2(k)+…+v i m(k)) / m;v i n is the business object d i The average historical business demand on the nth day within m months.

[0070] Furthermore, by calculating the similarity of the average historical business demand between any two business objects, when business object d i and business object d j If the similarity to the average historical business demand exceeds a preset threshold δ, then business object d is considered to be... i and business object d j There is a relationship between business requirement data, in business object d i and business object d j Create an edge and set its weight to the business object d. i and business object d j The similarity of the historical average business demand can be obtained by creating edges in the second topology graph by traversing each business object, thus obtaining the second association information 11.

[0071] Step 302: Input the training data into the input layer, and segment the historical business demand through M preset sliding windows to obtain M initial feature vectors.

[0072] The initial prediction model consists of an input layer, an attention mechanism layer, and an output layer connected in sequence.

[0073] In this embodiment of the invention, reference is made to Figure 5 By combining the first related information 10, the second related information 11, and the set 14 consisting of historical business demand and estimated business demand, training data can be constructed, which can then be further referenced. Figure 6 The diagram illustrates a structural block diagram of a prediction model provided by an embodiment of the present invention. First, the training data can be normalized to ensure that each data point has the same value range, facilitating model processing. The normalized training data can be input into the input layer of the initial prediction model. Specifically, the input layer uses M sliding windows to divide the normalized training data HM into M matrices HM1, HM2, ..., HMM, where HM1, HM2, ..., HMM are all N rows and p columns, and p and M are both positive integers. The business object d in the first association information 10 and the second association information 11... i Initial feature vector in the t-th sliding window For HMt's first i Rows; t = 1, 2, ... M, that is, the initial feature vector of each business object in M ​​different sliding windows.

[0074] exist i When the eigenvectors are 1, 2, ..., N, the initial feature vectors of all business objects in the t-th sliding window are obtained as follows: Let be the initial feature vector of business object d1 in the t-th sliding window. Let be the initial feature vector of business object d2 in the t-th sliding window. Let be the initial feature vector of business object dN in the t-th sliding window, and each business object has an initial feature vector in M ​​different sliding windows. For example, when t = 1, 2, ..., M, the business object dN has an initial feature vector. i Each corresponds to For business object d i The initial feature vector in the first sliding window, For business object d i The initial feature vector in the second sliding window, For business object d i The initial feature vector in the Mth sliding window.

[0075] Step 303: Input the M initial feature vectors into the attention mechanism layer to perform attention mechanism calculation and obtain the attention mechanism features of the business object.

[0076] Furthermore, refer to Figure 5 and Figure 6 After segmenting the training data through the sliding window of the input layer to obtain the initial feature vector, the initial feature vector can be input into the attention mechanism layer of the initial prediction model for attention mechanism calculation to obtain the attention mechanism features of the business objects. The attention mechanism features are the features that integrate the attention associations between business types and business demand data of business objects. During the training phase of the model, the output layer can construct the model output that participates in the calculation of the loss function based on the attention mechanism features. During the application phase of the model, the output layer can construct the accurate business demand of the business objects based on the attention mechanism features.

[0077] Specifically, the operations performed by the attention mechanism layer include sequential attention weighting operations and time-series attention weighting operations based on Long Short-Term Memory (LSTM) networks. The attention weighting operations can perform attention weighting based on the business type-based associations and weight values ​​between business objects reflected in the first association information, and the business demand data-based associations and weight values ​​between business objects reflected in the second association information, thereby learning the associations between business objects. The LSTM-based time-series attention weighting operation enables the model to learn the temporal variation patterns of business demand. The combination of these two operations allows the model to finely analyze the impact of different times, different business objects, and different associations on the prediction results, improving model accuracy.

[0078] Optionally, the attention mechanism layer includes, in sequence: a first attention layer, a second attention layer, and a third attention layer. Step 303 may specifically include:

[0079] Sub-step 3031: Input the M initial feature vectors into the first attention layer, and perform attention mechanism calculations on the M initial feature vectors based on the weights set between adjacent business objects in the first association information to obtain M first feature vectors.

[0080] Sub-step 3032: Based on the weights set between adjacent business objects in the second association information, perform attention mechanism calculations on the M initial feature vectors respectively to obtain M second feature vectors.

[0081] Optionally, the weight set between adjacent business objects in the first association information is 1; the weight set between adjacent business objects in the second association information is the similarity between the average historical business demand of adjacent business objects in the second association information.

[0082] In this embodiment of the invention, reference is made to Figure 5 , 6 7, Figure 7 The diagram illustrates the architecture of training parameters in a prediction model provided by an embodiment of the present invention. In the first attention layer, based on the edge with a weight of 1 between two business objects in the first association information (reflecting the presence or absence of business type attention), and the edge with a weight of the similarity of the average historical business demand of the two business objects in the second association information (reflecting the presence or absence of business demand data attention, and reflecting the magnitude of business demand data attention when it is present), the attention mechanism can be used to calculate the first feature vector by setting a weight of 1 between adjacent business objects in the first association information. Then, the attention mechanism can be used to calculate the second feature vector by setting the weight (average historical business demand of the two business objects) between adjacent business objects in the second association information.

[0083] The calculation process of the first feature vector in the first attention layer can be specifically implemented using the business object d. i The first feature vector corresponding to the t-th sliding window The calculation formula is as follows:

[0084]

[0085] Where σ() is a nonlinear activation function, BA(d i ) is the business object d i The set of neighbor nodes in the first association information (including d) i itself), For d i and d j The first attention weights between them (1), Softmax is a normalized exponential function, and q is a vector with the first parameter, which acquires values ​​during the learning process. T Let q be the transpose of the first parameter vector. The symbol for concatenated vectors; q T The length of its vector ensures that it can be used with... Multiply.

[0086] The calculation process of the second feature vector in the first attention layer can be specifically implemented using the business object d. iThe second feature vector corresponding to the t-th sliding window The calculation formula is as follows:

[0087]

[0088] Wherein, DA(d) i ) is the business object d i The set of neighboring nodes (including di itself) in the second association information. For d i and d j The second attention weights (d) between i and d j (Similarity between their respective historical average business demand volumes) sim is the similarity function.

[0089] Sub-step 3033: Input M first feature vectors and M second feature vectors into the second attention layer, and fuse the first feature vectors and the second feature vectors based on the respective influence weights of the first feature vectors and the second feature vectors to obtain M third feature vectors.

[0090] In this step, refer to Figure 5 , 6 7. In the second attention layer, based on M first feature vectors and M second feature vectors, feature fusion calculation can be performed based on the preset influence weights of the first and second feature vectors to obtain the third feature vector.

[0091] The calculation process of the third feature vector in the second attention layer can be specifically implemented using the business object d. i The third feature vector corresponding to the t-th sliding window The calculation formula is as follows:

[0092]

[0093] in, For the first associated information, the business object d i The influence weights are defined as follows: j = b represents the first association information, and j = d represents the second association information. p is a second parameter vector, which acquires values ​​during the learning process; W is a parameter matrix, which acquires values ​​during the learning process. for (when j = b) or (When j = d), the length of W guarantees that its vector can be used with other vectors. Multiply.

[0094] Sub-step 3034: Input the M third feature vectors into the long short-term memory network of the third attention layer, and fuse the output of the long short-term memory network to obtain the attention mechanism features of the business object.

[0095] In this step, refer to Figure 5 , 6 7. In the third attention layer, based on M third feature vectors, time-series changes in the third feature vectors can be learned to achieve time-series-based feature fusion and obtain the attention mechanism features of the business object.

[0096] The calculation process of the attention mechanism features in the third attention layer can be specifically implemented using business object d. i Corresponding attention mechanism feature z i The calculation formula is as follows:

[0097]

[0098] in, For business object d i The hidden state vector corresponding to the output of the t-th LSTM unit, Let be the hidden state vector output by the (t-1)th LSTM unit. for The corresponding third attention weight of the third attention layer.

[0099] Step 304: Normalize the attention mechanism features through the output layer to obtain the output demand of the business object.

[0100] In this embodiment of the invention, the output layer can normalize the attention mechanism features using the softmax algorithm to obtain the output demand of the business object during training. This output demand reflects the output value of the model during a single training session and can be used to calculate the loss function with the labeled true values ​​in the training data.

[0101] Step 305: Train the parameters of the initial prediction model based on the loss function calculated from the output demand and the estimated business demand as the true value, to obtain the target prediction model.

[0102] In this embodiment of the invention, the output demand of the initial prediction model for a set of training data can be used as the output value of this training. Together with the estimated business demand as the true value in the training data, the loss value is calculated, and the loss function is determined based on the loss value to train the parameters of the initial prediction model. After multiple rounds of iterative training operations or after reaching the preset training target, the iteration can be terminated to obtain the target prediction model.

[0103] Optionally, prior to step 302, the following steps are also included:

[0104] Step 306: Normalize the first associated information, the second associated information, the historical business demand, and the estimated business demand so that the first associated information, the second associated information, the historical business demand, and the estimated business demand are within the same value range.

[0105] In this embodiment of the invention, the training data can be normalized so that each data point has the same value range, making it easier for the model to process.

[0106] Optionally, prior to step 305, the following steps are also included:

[0107] Step 307: After the initial prediction model outputs the output value for the training data, the output value is denormalized.

[0108] In this embodiment of the invention, in order to facilitate the model's data processing, step 306 performs normalization processing on the training data. After obtaining the output value of the model, the output value can be denormalized to restore the true value of the output value within the true value range.

[0109] In summary, the target prediction model training method provided by this embodiment of the invention, during the training of the initial prediction model based on an attention mechanism using training data constructed from first association information, second association information, historical business demand, and estimated business demand, allows the initial prediction model to learn attention weights by utilizing the first association information reflecting the business type association between business objects and the second association information reflecting the business demand data association between business objects. This enables the model to finely mine the degree of influence of different times, different business objects, and different associations on the prediction results, improving the ability of the prediction results to support decision-making and enhancing the accuracy of anomaly detection in complex industrial systems.

[0110] Figure 8 This is a block diagram of a training device for a target prediction model provided in an embodiment of the present invention, such as... Figure 8 As shown, the device may include:

[0111] The first acquisition module 401 is used to acquire first association information between the business object and other business objects based on business type, and second association information between the business object and other business objects based on business demand data, as well as acquire the historical business demand volume and estimated business demand volume of the business object.

[0112] The training module 402 is used to train the initial prediction model based on an attention mechanism using training data constructed from the first association information, the second association information, the historical business demand, and the estimated business demand, to obtain the target prediction model.

[0113] Optionally, the initial prediction model includes, in sequence, an input layer, an attention mechanism layer, and an output layer;

[0114] The training module 402 includes:

[0115] The first processing submodule is used to input the training data into the input layer, and to segment the historical business demand through M preset sliding windows to obtain M initial feature vectors.

[0116] The second processing submodule is used to input the M initial feature vectors into the attention mechanism layer to perform attention mechanism calculation and obtain the attention mechanism features of the business object.

[0117] The third processing submodule is used to normalize the attention mechanism features through the output layer to obtain the output demand of the business object;

[0118] The fourth processing submodule is used to train the parameters of the initial prediction model based on the loss function calculated from the output demand and the estimated business demand as the true value, so as to obtain the target prediction model.

[0119] Optionally, the attention mechanism layer includes, in sequence: a first attention layer, a second attention layer, and a third attention layer; the second processing submodule includes:

[0120] The first processing unit is used to input the M initial feature vectors into the first attention layer, and perform attention mechanism calculations on the M initial feature vectors based on the weights set between adjacent business objects in the first association information to obtain M first feature vectors.

[0121] The second processing unit is used to perform attention mechanism calculations on the M initial feature vectors based on the weights set between adjacent business objects in the second association information to obtain M second feature vectors.

[0122] The third processing unit is used to input M first feature vectors and M second feature vectors into the second attention layer, and to fuse the first feature vectors and the second feature vectors based on the respective influence weights of the first feature vectors and the second feature vectors to obtain M third feature vectors.

[0123] The fourth processing unit is used to input the M third feature vectors into the long short-term memory network of the third attention layer, and fuse the output of the long short-term memory network to obtain the attention mechanism features of the business object.

[0124] Optionally, the weight set between adjacent business objects in the first association information is 1; the weight set between adjacent business objects in the second association information is the similarity between the average historical business demand of adjacent business objects in the second association information.

[0125] Optional, also includes:

[0126] The normalization module is used to normalize the first associated information, the second associated information, the historical business demand, and the estimated business demand, so that the first associated information, the second associated information, the historical business demand, and the estimated business demand are within the same value range.

[0127] Optional, also includes:

[0128] The denormalization module is used to perform denormalization processing on the output value.

[0129] Optionally, the first processing submodule includes:

[0130] The first establishment unit is used to traverse the other business objects based on the business object, and when there is an association between the business type of the business object and the other business objects, create an edge with a weight value of 1 between the business object and the other business objects;

[0131] The second establishment unit is used to obtain the first association information after the traversal is completed.

[0132] Optional, the second processing submodule includes:

[0133] The acquisition unit is used to acquire the average historical business demand volume of the business object and the other business objects respectively;

[0134] The third establishment unit is used to traverse the other business objects based on the business object, and when the similarity between the average historical business demand of the business object and the average historical business demand of other business objects is greater than a preset threshold, create an edge with a weight of 1 between the business object and the other business objects based on the similarity.

[0135] The fourth unit is used to obtain the second association information after the traversal is completed.

[0136] In summary, the target prediction model training device provided in this embodiment of the invention, during the training of the initial prediction model based on an attention mechanism using training data constructed from first association information, second association information, historical business demand, and estimated business demand, allows the initial prediction model to learn attention weights by utilizing the first association information reflecting the business type association between business objects and the second association information reflecting the business demand data association between business objects. This enables the model to finely mine the degree of influence of different times, different business objects, and different associations on the prediction results, improving the ability of the prediction results to support decision-making and enhancing the accuracy of anomaly detection in complex industrial systems.

[0137] Figure 9 This is a block diagram of a business demand forecasting device provided in an embodiment of the present invention, such as... Figure 9 As shown, the device may include:

[0138] The second acquisition module 501 is used to acquire the historical business demand of the business object to be predicted.

[0139] Prediction module 502 is used to input the historical business demand of the business object to be predicted into the target prediction model to obtain the business demand of the business object to be predicted.

[0140] The target prediction model is trained using a target prediction model training device.

[0141] In summary, the target prediction model training device provided in this embodiment of the invention, during the training of the initial prediction model based on an attention mechanism using training data constructed from first association information, second association information, historical business demand, and estimated business demand, allows the initial prediction model to learn attention weights by utilizing the first association information reflecting the business type association between business objects and the second association information reflecting the business demand data association between business objects. This enables the model to finely mine the degree of influence of different times, different business objects, and different associations on the prediction results, improving the ability of the prediction results to support decision-making and enhancing the accuracy of anomaly detection in complex industrial systems.

[0142] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0143] Figure 10 This is a block diagram illustrating an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0144] Reference Figure 10 The electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.

[0145] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.

[0146] Memory 604 is used to store various types of data to support the operation of electronic device 600. Examples of such data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, multimedia, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0147] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.

[0148] Multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a multimedia mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0149] Audio component 610 is used to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) used to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.

[0150] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0151] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 can detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or a component of electronic device 600, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0152] Communication component 616 facilitates wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0153] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement a training method for a target prediction model provided in an embodiment of this disclosure.

[0154] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0155] Figure 11 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. (Refer to...) Figure 11 The electronic device 700 includes a processing component 722, which further includes one or more processors, and memory resources represented by memory 732 for storing instructions, such as application programs, that can be executed by the processing component 722. The application programs stored in memory 732 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 722 is configured to execute instructions to perform the methods provided in embodiments of this disclosure.

[0156] Electronic device 700 may also include a power supply component 726 configured to perform power management of electronic device 700, a wired or wireless network interface 750 configured to connect electronic device 700 to a network, and an input / output (I / O) interface 758. Electronic device 700 may operate on an operating system stored in memory 732, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0157] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the method.

[0158] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0159] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for training a target prediction model, characterized in that, The method includes: Obtain first association information between the business object and other business objects based on business type, and second association information between the business object and other business objects based on business demand data, as well as obtain the historical business demand volume and estimated business demand volume of the business object; Based on the training data constructed from the first association information, the second association information, the historical business demand, and the estimated business demand, the initial prediction model is trained using an attention mechanism to obtain the target prediction model. The acquisition of the first association information between a business object and other business objects based on the business type includes: Based on the business object, traverse the other business objects. If there is an association between the business type of the business object and the business type of other business objects, create an edge with a weight of 1 between the business object and the other business objects. After the traversal is complete, the first associated information is obtained; The step of obtaining the second association information between the business object and other business objects regarding business requirement data includes: Obtain the average historical business demand volume of the aforementioned business object and the other business objects; Based on the business object, traverse the other business objects. If the similarity between the average historical business demand of the business object and the average historical business demand of other business objects is greater than a preset threshold, create an edge with a weight of 1 between the business object and the other business objects based on the similarity. After the traversal is complete, the second association information is obtained; The training method for the target prediction model further includes: Obtain the historical business demand volume of the business object to be predicted; Input the historical business demand of the business object to be predicted into the target prediction model to obtain the business demand of the business object to be predicted.

2. The method according to claim 1, characterized in that, The initial prediction model comprises, in sequence, an input layer, an attention mechanism layer, and an output layer; The step of training the initial prediction model based on an attention mechanism using training data constructed from the first association information, the second association information, the historical business demand, and the estimated business demand to obtain the target prediction model includes: The training data is input into the input layer, and the historical business demand is segmented through M preset sliding windows to obtain M initial feature vectors; The M initial feature vectors are input into the attention mechanism layer to perform attention mechanism calculation, thereby obtaining the attention mechanism features of the business object; The output layer normalizes the attention mechanism features to obtain the output demand of the business object. The parameters of the initial prediction model are trained using a loss function calculated from the output demand and the estimated business demand as the true value, to obtain the target prediction model.

3. The method according to claim 2, characterized in that, The attention mechanism layer comprises, in sequence, a first attention layer, a second attention layer, and a third attention layer. The step of inputting M initial feature vectors into the attention mechanism layer for attention mechanism calculation to obtain the attention mechanism features of the business object includes: The M initial feature vectors are input into the first attention layer, and the attention mechanism is used to calculate the M initial feature vectors based on the weights set between adjacent business objects in the first association information to obtain M first feature vectors. Based on the weights set between adjacent business objects in the second association information, attention mechanisms are used to calculate M initial feature vectors to obtain M second feature vectors. M first feature vectors and M second feature vectors are input into the second attention layer, and the first feature vectors and the second feature vectors are fused based on the respective influence weights of the first feature vectors and the second feature vectors to obtain M third feature vectors. The M third feature vectors are input into the long short-term memory network of the third attention layer, and the outputs of the long short-term memory network are fused to obtain the attention mechanism features of the business object.

4. The method according to claim 3, characterized in that, The weight set between adjacent business objects in the first association information is 1; the weight set between adjacent business objects in the second association information is the similarity between the average historical business demand of adjacent business objects in the second association information.

5. The method according to claim 1, characterized in that, Before training the initial prediction model based on an attention mechanism to obtain the target prediction model, the following steps are also included: The first associated information, the second associated information, the historical business demand, and the estimated business demand are normalized so that they are all within the same value range.

6. The method according to claim 5, characterized in that, After the initial prediction model outputs its output value for the training data, the method further includes: The output value is then denormalized.

7. A training device for a target prediction model, characterized in that, The device includes: The first acquisition module is used to acquire first association information between the business object and other business objects based on business type, and second association information between the business object and other business objects based on business demand data, as well as acquire the historical business demand volume and estimated business demand volume of the business object. The training module is used to train the initial prediction model based on an attention mechanism using training data constructed from the first association information, the second association information, the historical business demand, and the estimated business demand, to obtain the target prediction model. The second acquisition module is used to acquire the historical business demand of the business object to be predicted. The prediction module is used to input the historical business demand of the business object to be predicted into the target prediction model to obtain the business demand of the business object to be predicted. The training module includes: The first establishment unit is used to traverse the other business objects based on the business object, and when there is an association between the business type of the business object and the other business objects, create an edge with a weight value of 1 between the business object and the other business objects; The second establishment unit is used to obtain the first association information after the traversal is completed; The acquisition unit is used to acquire the average historical business demand volume of the business object and the other business objects respectively; The third establishment unit is used to traverse the other business objects based on the business object, and when the similarity between the average historical business demand of the business object and the average historical business demand of other business objects is greater than a preset threshold, create an edge with a weight of 1 between the business object and the other business objects based on the similarity. The fourth unit is used to obtain the second association information after the traversal is completed.

8. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 6.