Data prediction method and device

By controlling the prediction data of the hierarchical node in the prediction model satisfies the hierarchical constraints, and using the prediction and correction layers to perform data correction, the problem of low prediction accuracy of multi-level structure data is solved, and higher prediction accuracy and simplified data processing are achieved. process.

CN119090078APending Publication Date: 2024-12-06LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411215539.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

After multi-level structure data prediction meets hierarchical relationship constraints, the prediction accuracy is low and complex reconciliation operations are required to affect data accuracy.

Method used

By controlling the prediction sequence data of different levels of nodes in the prediction model to satisfy the hierarchical constraints, the prediction layer and correction layer in the prediction model are used to correct and normalize the primary prediction data, avoid unnecessary reconciliation operations, and output directly Predictive sequence data that satisfies hierarchical constraints.

Benefits of technology

It improves the accuracy of data prediction and the accuracy of node prediction data in the hierarchical structure, reduces data inaccuracy caused by reconciliation operations, and simplifies the complexity of data prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090078A_ABST
    Figure CN119090078A_ABST
Patent Text Reader

Abstract

The invention provides a data prediction method and device, and the method comprises the steps: obtaining the historical sequence data of each node in a target hierarchical structure, the target hierarchical structure being used for representing the hierarchical relation between to-be-predicted different objects in a target business scene, the nodes being used for representing the objects in the target business scene, the historical sequence data of the node comprises data of the node at at least one historical time point; based on historical sequence data of each node in the target hierarchical structure, prediction sequence data of the nodes are determined by using a prediction model, and the prediction sequence data of the nodes comprise prediction data of the nodes on at least one prediction time point; wherein in the process of determining the prediction sequence data of the nodes, the prediction model controls the prediction sequence data of the nodes of different hierarchies to meet hierarchy constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data prediction method and device. Background Art

[0002] At present, many fields use multi-level structures for data prediction, where the multi-level structure is used to describe the hierarchical relationship between data of different granularities. For example, taking the sales forecast of the goods sales industry as an example, the sales of the goods sales industry can be a three-level hierarchical structure, where the top level is the company's total sales, the middle level is the sales of each branch, and the last level is the sales of different dealers under each branch. For another example, taking the scenario of determining the material demand of a certain enterprise group as an example, the material demand of the enterprise group can be a four-level hierarchical structure, where the four levels from top to bottom are: the top level is the total material demand of the enterprise group, the second level is the material demand of each branch, the third level is the material demand of each outlet under each branch; and the fourth level is the material demand of each store of each outlet.

[0003] The data prediction of multi-level structures needs to meet the hierarchical relationship constraints, that is, for any two adjacent layers in the hierarchical structure, the prediction value of the upper layer needs to be equal to the sum of the prediction values ​​of the lower layers. In order to meet this hierarchical relationship constraint, it is necessary to reconcile the prediction results after predicting the prediction results of each layer, so that the prediction results between adjacent layers meet the hierarchical relationship constraints through reconciliation. However, the prediction results after reconciliation have the problem of low prediction accuracy. Summary of the invention

[0004] On the one hand, the present application provides a data prediction method, comprising:

[0005] Obtaining historical sequence data of each node in a target hierarchical structure, wherein the target hierarchical structure is used to characterize a hierarchical relationship between different objects to be predicted in a target business scenario, the nodes are used to represent the objects in the target business scenario, and the historical sequence data of the nodes includes data of the nodes at at least one historical time point;

[0006] Based on the historical sequence data of each node in the target hierarchical structure, using a prediction model to determine the prediction sequence data of the node, the prediction sequence data of the node including the prediction data of the node at at least one prediction time point;

[0007] In the process of determining the prediction sequence data of the node, the prediction model controls the prediction sequence data of nodes at different levels to satisfy the hierarchical constraints.

[0008] In a possible implementation, the determining the predicted sequence data of the node by using a prediction model based on the historical sequence data of each node in the target hierarchical structure includes:

[0009] Based on the historical sequence data of each node in the target hierarchical structure, the primary prediction sequence data of each node is determined using a prediction model, and the primary prediction sequence data of the node is corrected to obtain the prediction sequence data of each node.

[0010] In yet another possible implementation, the method further includes: obtaining predicted sequence data of a root node in the target hierarchical structure:

[0011] The method of determining primary prediction sequence data of each node based on the historical sequence data of each node in the target hierarchical structure by using a prediction model and correcting the primary prediction sequence data of the node includes:

[0012] Based on the historical sequence data of each node in the target hierarchical structure and the predicted sequence data of the root node, the prediction layer in the prediction model is used to determine the primary predicted sequence data of each node except the root node;

[0013] For the first node that is not a leaf node in the target hierarchical structure, the correction layer in the prediction model is used to normalize the primary prediction sequence data of each second node associated with the first node to obtain the prediction sequence data of each second node. The second node associated with the first node is a node that is at the next level of the level where the first node is located and is connected to the first node.

[0014] In yet another possible implementation, the primary prediction sequence data of the node includes primary prediction data of the node at at least one prediction time point;

[0015] The normalizing process of the primary prediction sequence data of each second node associated with the first node by using the correction layer in the prediction model includes:

[0016] For each prediction time point, using the target conversion function configured in the correction layer of the prediction model, determining a data conversion value corresponding to the primary prediction sequence data of the second node associated with the first node at the prediction time point;

[0017] In combination with the data conversion values ​​of each second node associated with the first node at the prediction time point, the data conversion value of each second node at the prediction time point is normalized using the verification layer of the prediction model;

[0018] The target conversion function is a Taylor expansion function of a target order corresponding to an exponential function with e as the base.

[0019] In another possible implementation, based on the historical sequence data of each node in the target hierarchical structure and the predicted sequence data of the root node, determining the primary predicted sequence data of each node except the root node by using the prediction layer in the prediction model includes:

[0020] Based on the historical sequence data of each node in the target hierarchical structure and the predicted sequence data of the root node, a target correction coefficient and primary predicted sequence data of each node except the root node are determined using a prediction layer in a prediction model, wherein the target correction coefficient is used to characterize a business category of a target business scenario corresponding to the target hierarchical structure;

[0021] The normalizing process of the primary prediction sequence data of each second node associated with the first node by using the correction layer in the prediction model includes:

[0022] Based on the target correction coefficient, the primary prediction sequence data of each second node associated with the first node is normalized using the correction layer in the prediction model.

[0023] In another possible implementation, the prediction model is obtained by training based on historical sequence data samples of each sample node in at least one hierarchical structure sample, with the prediction sequence data samples of the sample node predicted by the prediction model and obtained after correction being consistent with the actual sequence data samples of the sample node as a training target;

[0024] Wherein, for any first sample node that is not a leaf node in the hierarchical structure sample, the actual sequence data sample of the second sample node associated with the first sample node satisfies the hierarchical constraint with the actual sequence data sample of the first sample node;

[0025] The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node in the hierarchical structure sample that is located at the next level of the level where the first sample node is located and is connected to the first sample node.

[0026] In another possible implementation, the prediction model is obtained by training with a set training target based on historical sequence data samples of each sample node in at least one hierarchical structure sample and actual sequence data samples of the sample node, wherein the actual sequence data samples of the sample node include: actual data of the sample node at at least one sample prediction time point;

[0027] The set training objectives are: to minimize the gap between the predicted sequence data sample of the sample node predicted by the prediction model and the actual sequence data sample of the sample node; and to minimize the gap between the sum of the predicted data of each second sample node associated with the first sample node in the hierarchical structure sample at the sample prediction time point and the predicted data of the first sample node at the sample prediction time point;

[0028] The prediction sequence data sample of the sample node includes the prediction data of the sample node at the at least one sample prediction time point;

[0029] Among them, the first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node located in the next level of the level where the first sample node is located in the hierarchical structure sample and connected to the first sample node.

[0030] In another possible implementation, the determining the predicted sequence data of the node by using a prediction model based on the historical sequence data of each node in the target hierarchical structure includes:

[0031] Based on the historical sequence data of each node in the target hierarchical structure, a prediction model is used to determine a prediction marginal distribution sequence of each node, wherein the prediction marginal distribution sequence includes the marginal distribution of the node at at least one prediction time point.

[0032] In another possible implementation, the determining the predicted sequence data of the node by using a prediction model based on the historical sequence data of each node in the target hierarchical structure further includes:

[0033] Based on the historical sequence data of each node in the target hierarchical structure, the connection parameter sequence of each level in the target hierarchical structure is determined by using the prediction model, wherein the connection parameter sequence of each level includes the connection parameters of the level at at least one prediction time point;

[0034] For each level in the target hierarchical structure, based on the connection parameters of the level at the prediction time point, the marginal distributions of the nodes in the level at the prediction time point are connected to obtain the joint distribution of the nodes in the level at the prediction time point;

[0035] Based on the joint distribution of each node in the layer at the prediction time point, the prediction data of the node in the layer at the prediction time point is sampled to obtain prediction sequence data composed of the prediction data of the node in the layer at at least one prediction time point.

[0036] In another possible implementation, the prediction model is obtained by training with a set training target based on historical sequence data samples of each sample node in at least one hierarchical structure sample and actual sequence data samples of the sample node, and the actual sequence data samples include actual data of the sample node at at least one sample prediction time point;

[0037] The training objectives are: minimizing the gap between the predicted data of the sample node at the sample prediction time point and the actual data; and minimizing the gap between the predicted data distribution of the first sample node and the total predicted data distribution of each second sample node associated with the first sample node at the sample prediction time point;

[0038] The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node located at a level below the level of the first sample node in the hierarchical structure sample and connected to the first sample node;

[0039] The predicted data distribution of the first sample node is the distribution of the predicted data of the first sample node located at the same position in the at least one hierarchical structure sample at the sample prediction time point;

[0040] The distribution of the total predicted data of each second sample node associated with the first sample node at the sample prediction time point is a distribution consisting of the total target predicted data corresponding to each first sample node at the same position in the at least one hierarchical structure sample, wherein the total target predicted data corresponding to the first sample node is the total predicted data of each second sample node associated with the first sample node at the sample prediction time point.

[0041] In another aspect, the present application further provides a data prediction device, comprising:

[0042] a data acquisition unit, configured to acquire historical sequence data of each node in a target hierarchical structure, wherein the target hierarchical structure is used to characterize the hierarchical relationship between different objects to be predicted in a target business scenario, the nodes are used to represent the objects in the target business scenario, and the historical sequence data of the nodes includes data of the nodes at at least one historical time point;

[0043] A sequence prediction unit, configured to determine predicted sequence data of each node in the target hierarchical structure using a prediction model based on historical sequence data of each node, wherein the predicted sequence data of the node includes predicted data of the node at at least one prediction time point;

[0044] In the process of determining the prediction sequence data of the node, the prediction model controls the prediction sequence data of nodes at different levels to satisfy the hierarchical constraints. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0046] Figure 1 A schematic diagram of a flow chart of the data prediction method provided in this application;

[0047] Figure 2 A schematic diagram of another flow chart of the data prediction method provided in this application;

[0048] Figure 3 A schematic diagram of another flow chart of the data prediction method provided in this application;

[0049] Figure 4 An example diagram of a training principle for the training prediction model provided in this application;

[0050] Figure 5 A schematic diagram of another flow chart of the data prediction method provided in this application;

[0051] Figure 6 An example diagram of two hierarchical structure samples with the same composition structure provided for this application;

[0052] Figure 7 A schematic diagram of a training process for training a prediction model in this application;

[0053] Figure 8 This is an example diagram of a principle framework for training a prediction model in this application;

[0054] Fig. 9 A schematic diagram of a structure of a data prediction device provided in this application;

[0055] Fig.10 A schematic diagram of the composition architecture of an electronic device provided in this application. DETAILED DESCRIPTION

[0056] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0057] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0058] like Figure 1 , showing a flow chart of the data prediction method provided by the present application, the method of this embodiment can be applied to any electronic device with data processing and computing capabilities, for example, the electronic device can be a node in a personal computer, a server or a cloud platform system, without limitation.

[0059] The method of this embodiment may include:

[0060] S101, obtaining historical sequence data of each node in the target hierarchical structure.

[0061] In this application, the target hierarchical structure is used to characterize the hierarchical relationship between different objects to be predicted in the target business scenario. The target hierarchical structure is a hierarchical structure for time series prediction of the hierarchy. The target hierarchical structure includes multiple hierarchies, each of which includes at least one node. The nodes in the target hierarchical structure are used to represent objects in the target business scenario.

[0062] Among them, the target business scenario can be any business scenario that requires data prediction and has a hierarchical relationship between the objects involved in the data prediction. For example, the target business scenario is product sales prediction, product output value prediction, and product supply prediction. There is no restriction on this. For ease of understanding, taking the target business scenario of product sales prediction as an example, the target hierarchical structure corresponding to the product sales prediction can be a three-layer hierarchical structure, the top layer is the total sales of all products in the city, the middle layer is the sales of products in various regions in the city, and the bottom layer is the sales of products in each store in each region.

[0063] It should be noted that, since multi-level predictions can be made layer by layer, the target hierarchical structure can be a hierarchical structure used to characterize the complete hierarchical relationship between all objects to be predicted involved in the target business scenario, or it can be a hierarchical structure with at least two levels that only includes some objects to be predicted in the target business scenario. For example, the hierarchical relationship of all objects in the target business scenario can be expressed as a four-layer hierarchical structure, and the target hierarchical structure is a hierarchical structure between some or all nodes in any two adjacent layers or three layers of the four-layer hierarchical structure, and there is no restriction on this.

[0064] The sequence data of a node is also referred to as the time series of the node, which includes the data of the node at at least one time point. In this application, the time point at which the corresponding data of the node has been determined is called the historical time point, and the time point at which the data needs to be predicted is called the predicted time point.

[0065] Correspondingly, the historical sequence data of a node is also called the historical time series of the node, which includes the data of the node at at least one historical time point. For example, if the node is product sales, then the historical sequence data of the node is the historical product sales of the node at at least one historical time point.

[0066] S102, based on the historical sequence data of each node in the target hierarchical structure, using the prediction model to determine the predicted sequence data of the node.

[0067] The prediction sequence data of a node (also referred to as a prediction time series) includes prediction data of the node at at least one prediction time point.

[0068] In the present application, the prediction model controls the prediction sequence data of nodes at different levels to satisfy the hierarchical constraints in the process of determining the prediction sequence data of the node. As mentioned above, the hierarchical constraint relationship means that in the target hierarchical structure, the prediction data of a node at a prediction time point is the same or approximately the same as the sum of the prediction data of each node at the next level and connected to the node at the prediction time point.

[0069] It is understandable that after the conventional prediction model predicts the prediction sequence data of the node, it is necessary to reconcile the prediction sequence data of each node. Only after the reconciliation, the prediction sequence data of each node can meet the hierarchical relationship. However, reconciling the prediction sequence data of each node will inevitably change the prediction sequence data actually predicted by each node, resulting in that although the prediction sequence data of each node after adjustment meets the hierarchical constraint, the accuracy of the reconciled prediction data sequence corresponding to the node is greatly reduced because the prediction data sequence of each node is greatly changed, and it cannot accurately reflect the data situation of the node at the subsequent time point.

[0070] In the present application, the prediction sequence data of each node predicted by the prediction model satisfies the hierarchical constraint, and no separate reconciliation is required, which can avoid blind reconciliation that affects the accuracy of the prediction sequence data of each node. For example, the prediction model can be a model that includes a reconciliation (or correction function) function, or the prediction model is a trained model, and the prediction data sequences of the nodes predicted by the prediction model can meet the hierarchical constraint relationship through training the prediction model, thereby achieving a similar reconciliation effect.

[0071] From the above content, it can be seen that since the prediction model in the present application can control the prediction sequence data of nodes at different levels to satisfy the hierarchical constraints in the process of predicting the prediction sequence data of each node in the target hierarchical structure, the prediction sequence data of each node predicted by the prediction model can not only meet the accuracy requirements, but also satisfy the hierarchical constraints between the prediction sequence data of each node, so that there is no need to reconcile the prediction sequence data of the nodes at each level, which can naturally reduce the situation where the prediction sequence data of the node is inaccurate due to the large-scale adjustment of the original prediction sequence data of the node due to the reconciliation of the prediction sequence data of the node.

[0072] In addition, since the predicted sequence data of each node predicted by the solution of the present application satisfy the hierarchical constraint relationship, there is no need to perform a reconciliation operation, which can naturally reduce the complexity of data prediction based on the hierarchical structure.

[0073] The following introduces different possible implementations of the prediction model to predict the prediction data sequence of each node.

[0074] In a first possible implementation, based on the historical sequence data of each node in the target hierarchical structure, the primary prediction sequence data of each node is determined using a prediction model, and the primary prediction sequence data of each node is corrected to obtain the prediction sequence data of each node.

[0075] In this implementation, the prediction model has prediction and correction functions. The predicted data sequence of each node after prediction and correction can not only accurately reflect the actual data situation of the node at each prediction time point, but also make the predicted data sequences of each node meet the hierarchical constraints.

[0076] In this possible implementation, during the process of training the prediction model, the prediction data sequences of each node predicted by the prediction model and corrected can satisfy the hierarchical prediction.

[0077] For example, the prediction model can be obtained by training based on historical sequence data samples of each sample node in at least one hierarchical structure sample, with the predicted sequence data samples of the sample nodes predicted by the prediction model and corrected being consistent with the actual sequence data samples of the sample nodes as the training target.

[0078] In the present application, for the sake of distinction, the hierarchical structure of the training prediction model is referred to as a hierarchical structure sample, and the nodes in each level of the hierarchical structure sample are referred to as sample nodes. Correspondingly, the historical sequence data of the sample node is referred to as the historical sequence data sample of the sample node. Therefore, the historical sequence data sample of the sample node may include the data of the sample node at at least one historical time point. Similarly, during the training process, each prediction time point is referred to as a sample prediction time point. The prediction sequence data of the sample node may also be referred to as the prediction sequence data sample of the sample node, which includes the prediction data of the sample node at at least one sample prediction time point. Among them, the actual sequence data sample of the sample node includes the actual data of the sample node at at least one sample prediction time point.

[0079] Among them, for the first sample node of any non-leaf node in the hierarchical structure sample, the actual sequence data sample of the second sample node associated with the first sample node satisfies the hierarchical constraint with the actual sequence data sample of the first sample node, that is, the sum of the actual data of each second sample node associated with the first sample node at the sample prediction time point is the same as the actual data of the first sample node at the sample prediction time point.

[0080] The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node in the hierarchical structure sample that is located at the next level of the level where the first sample node is located and is connected to the first sample node.

[0081] It can be understood that in order to ensure the accuracy of data prediction, the target hierarchical structure has the same composition structure as the hierarchical structure samples of the training prediction model, that is, the target hierarchical structure has the same number of levels as each hierarchical structure sample, the same number of nodes in the same level, and the same connection relationship between nodes in different levels.

[0082] It is understandable that the specific process of training the prediction model can adopt any supervised training method without limitation.

[0083] In the first possible implementation, the prediction model may also include a prediction layer and a correction layer. Accordingly, based on the historical sequence data of each node in the target hierarchical structure, the prediction layer in the prediction model is used to determine the primary prediction sequence data of each node. It can be understood that the top-level node in the target hierarchical structure is the root node in the target hierarchical structure. Since there are no other nodes connected to the root node and at a higher level in the target hierarchical structure, for the root node, the primary prediction sequence data of the root node can be directly determined as the prediction sequence data of the root node.

[0084] On this basis, for the first node in the target hierarchical structure that is not a leaf node, the correction layer in the prediction model is used to normalize the primary prediction sequence data of each second node associated with the first node to obtain the prediction sequence data of each second node. Among them, the leaf node in the target hierarchical structure refers to the node at the bottom of the target hierarchical structure, and the leaf node does not have other nodes connected to it and at a lower level. Among them, the second node associated with the first node is a node at the next level of the level where the first node is located and connected to the first node.

[0085] It can be seen that for each first node, since the data of the second node located at the next level of the first node and connected to the first node needs to satisfy the hierarchical constraint with the data of the first node, for each first node, the present application will normalize the second node associated with the first node, so that the sum of the predicted data of each second node at each prediction time point obtained after normalization is the same as the predicted data of the first node at the corresponding prediction time point (in actual applications, the same here includes approximately the same), and the predicted data of each second node at the prediction time point can accurately reflect its value at the prediction time point.

[0086] Furthermore, considering that the data of nodes at each level can be predicted layer by layer in the multi-level prediction process, based on this, in order to improve the accuracy of the prediction sequence data of nodes at each level in the target hierarchical structure, the present application can also first obtain the prediction sequence data of the root node in the target hierarchical structure. Then, based on the prediction sequence data of the root node in the target hierarchical structure and the historical sequence data of the remaining nodes, the prediction model is used to predict and correct the primary prediction sequence data of each node other than the root node. Figure 2 Provide detailed explanation.

[0087] like Figure 2 , shows another flow chart of the data prediction method provided by the present application. The method of this embodiment may include the following steps S201 to S204:

[0088] S201, obtaining historical sequence data of each node in the target hierarchical structure.

[0089] The target hierarchical structure is used to characterize the hierarchical relationship between different objects to be predicted in the target business scenario. The node is used to represent the object in the target business scenario, and the historical sequence data of the node includes data of the node at at least one historical time point.

[0090] This step can be described in detail in the previous embodiment and will not be described again here.

[0091] S202, obtaining predicted sequence data of the root node in the target hierarchical structure.

[0092] The predicted sequence data of the root node includes the predicted data of the root node at at least one predicted time point.

[0093] The predicted sequence data of the root node in the target hierarchical structure can be obtained in a variety of ways, which are not limited in this application. For example, the predicted sequence data of the root node can be predicted using a conventional prediction network based on the historical sequence data of the root node. Of course, the predicted sequence data of the root node can also be obtained in other ways.

[0094] S203, based on the historical sequence data of each node in the target hierarchical structure and the predicted sequence data of the root node, the prediction layer in the prediction model is used to determine the primary predicted sequence data of each node except the root node.

[0095] In this application, for the sake of distinction, the prediction sequence data of each node predicted by the prediction layer is referred to as primary prediction sequence data. The primary prediction sequence data includes the primary prediction data of the node at at least one prediction time point.

[0096] The prediction layer may be composed of a neural network model or other machine learning models, without limitation.

[0097] S204, for the first node that is not a leaf node in the target hierarchical structure, the primary prediction sequence data of each second node associated with the first node is normalized using the correction layer in the prediction model to obtain the prediction sequence data of each second node.

[0098] The second node associated with the first node is a node that is located at a level below the level of the first node and is connected to the first node.

[0099] The purpose of normalizing the initial prediction sequence data of the second node associated with the first node by the correction layer is to make the prediction sequence data of each second node obtained after normalization satisfy the hierarchical constraint with the prediction sequence data of the first node. That is, for each prediction time point, the prediction data of the first node at the prediction time point and the sum of the prediction data of each second node associated with the first node at the prediction time point are the same.

[0100] It can be seen that the prediction layer and correction layer of the prediction model can not only predict the prediction sequence data of each node in different levels, but also the prediction sequence data of each node in different levels satisfy the hierarchical constraints; moreover, the application combines the prediction sequence data of the root node in the prediction process to predict the nodes of other levels, which is beneficial to improve the accuracy of the prediction model in predicting the prediction sequence data of other nodes layer by layer.

[0101] In this embodiment, there may be many possible specific functions for normalizing the primary prediction sequence data of the second node in the correction layer, and there is no limitation to this.

[0102] In one possible scenario, a target conversion function may be configured in the correction layer of the prediction model, and the target conversion function is used to uniformly convert the initial prediction sequence data of each second node at each prediction time point before normalization. Based on this, for each second node associated with the first node, for each prediction time point, the target conversion function configured in the correction layer of the prediction model can be used to determine the data conversion value corresponding to the primary prediction sequence data of the second node associated with the first node at the prediction time point. Accordingly, in combination with the data conversion values ​​of each second node associated with the first node at the prediction time point, the data conversion value of each second node at the prediction time point is normalized using the verification layer of the prediction model. For example, the ratio of the data conversion value of the second node at the prediction time point to the sum of the data conversion values ​​of each second node associated with the first node is determined as the prediction data of the second node at the prediction time point.

[0103] Among them, the target conversion function can have many possibilities, and there is no restriction on this. After research, the inventor found that if the correction layer uses a normalization function such as softmax, since this type of normalization function is suitable for classification problems, the performance in hierarchical prediction is relatively poor, and the correction layer uses a Taylor expansion based on a specified function with e as the base for normalization, which is more suitable for hierarchical prediction.

[0104] Based on this, in the present application, the target conversion function in the correction layer can be a Taylor expansion function of the target order corresponding to the exponential function with e as the base.

[0105] The target order may be set as required, and is generally an even order.

[0106] For example, in one possible case, the target order can be fixed to the second order, and accordingly, the target conversion function is the second-order Taylor expansion function of the exponential function with e as the base. On this basis, for the prediction data y of the i-th second node associated with the first node at a prediction time point i The following formula 1 can be used for normalization:

[0107]

[0108] Wherein, i can be a natural number from 1 to N, N is the total number of second nodes associated with the first node, and the numerator in Formula 1, namely is a second-order Taylor expansion corresponding to an exponential function with base e, which represents y iThe data conversion value converted by the target conversion function. The value of j is also a natural number from 1 to N. Therefore, the denominator in Formula 1 is the sum of the data conversion values ​​of the second nodes associated with the first node.

[0109] Of course, in practical applications, the primary prediction sequence data of each second node can also be directly normalized. In this case, y in Formula 1 i It can be regarded as the primary prediction sequence data of the second node and will not be elaborated on.

[0110] In another possible scenario, the target order may be different for the second nodes of different levels. For each level, the target order in the corresponding target conversion function may be determined based on the discrete degree of the sequence data samples of each sample node in the corresponding level in the hierarchical structure samples used to train the prediction model, wherein the greater the discrete degree of the sequence data samples of the sample nodes in the corresponding level, the higher the target order.

[0111] Furthermore, considering that some different types of business scenarios require different objects of prediction data, the composition structure of the hierarchical structure representing the relationship between different objects in the business scenarios may be the same. On this basis, in order to make the prediction model applicable to data prediction of different business scenarios with the same hierarchical structure, in the prediction model, while outputting the prediction sequence data of the node, the target correction coefficient can also be output, so as to be corrected in combination with the target correction coefficient during the normalization process. Among them, when the target business scenarios are different, the target correction coefficient determined by the prediction model will also be different in combination with the historical sequence data of each node in each hierarchical structure.

[0112] Based on this, in this application, based on the historical sequence data of each node in the target hierarchical structure and the predicted sequence data of the root node, the prediction layer in the prediction model can be used to determine the target correction coefficient and the primary prediction sequence data of each node except the root node. Among them, the target correction coefficient can be used to characterize the business category of the target business scenario corresponding to the current target hierarchical structure to be predicted. Accordingly, during normalization processing, the primary prediction sequence data of each second node associated with the first node can be normalized based on the target correction coefficient using the correction layer in the prediction model.

[0113] On the above basis, the prediction model is obtained by training based on the historical sequence data samples of each sample node in at least one hierarchical structure sample, with the prediction sequence data samples of each sample node obtained by the correction layer of the prediction model being consistent with the actual sequence data samples of each sample node as the training target. Among them, for any first sample node that is not a leaf node in the hierarchical structure sample, the actual sequence data sample of the second sample node associated with the first sample node satisfies the hierarchical constraint with the actual sequence data sample of the first sample node.

[0114] For ease of understanding, the following takes the prediction model as an example of a prediction model with a two-layer hierarchical structure. Correspondingly, the target hierarchical structure is also a two-layer hierarchical structure. Figure 3 , shows another flow chart of the data prediction method provided by the embodiment of the present application. The method of this embodiment may include:

[0115] S301, obtaining historical sequence data of the first node and each second node in the target hierarchical structure and predicted sequence data of the first node.

[0116] The target hierarchical structure is used to characterize the hierarchical relationship between different objects to be predicted in the target business scenario.

[0117] In the present application, a target hierarchical structure is taken as an example of a two-layer hierarchical structure. Therefore, the target hierarchical structure includes a first node located in the upper layer, and at least one second node located in the lower layer and connected to the first node. On this basis, the first node is also the root node in the target hierarchical structure.

[0118] There are many possibilities for the specific implementation of obtaining the predicted sequence data of the first node, and there is no limitation to this.

[0119] For example, the target hierarchical structure is a complete hierarchical structure corresponding to the target business scenario. Since the first node does not have other nodes located above it and connected to it, it naturally does not involve satisfying hierarchical constraints with its upper nodes. Therefore, it can use any conventional method to determine the predicted sequence data of the first node.

[0120] For another example, the target hierarchical structure is a partial structure in the overall hierarchical structure corresponding to the target business scenario. In this case, the prediction sequence data of the nodes in each layer can be predicted layer by layer from top to bottom for the overall hierarchical structure, and in the layer-by-layer prediction process, the connection structure composed of any adjacent upper and lower layers of nodes with a connection relationship can be a target hierarchical structure.

[0121] For example, the overall hierarchical structure includes: a three-layer structure, which is the first layer, the second layer and the third layer from top to bottom, wherein the first layer includes node S as the root node, the second layer includes node B and node C connected to node S, and the third layer includes: node b1 and node b2 connected to node B, and node c1 and node c2 connected to node C. On this basis, the hierarchical structure composed of node S, node B and node C can constitute a target hierarchical structure, and the hierarchical structure of node B with nodes b1 and b2 can also constitute another target hierarchical structure. Similarly, the hierarchical structure of node C with nodes c1 and c2 can also constitute another target hierarchical structure.

[0122] On this basis, the first node in the target hierarchical structure can be the second node in other target hierarchical structures, then the predicted sequence data of the first node can be predicted before predicting the target hierarchical structure using the solution of this embodiment. When the first node is the root node in the overall hierarchical structure, other methods can be used to predict its predicted sequence data, without limitation.

[0123] S302, based on the historical sequence data of the first node and each second node in the target hierarchical structure and the predicted sequence data of the first node, the prediction layer in the prediction model is used to determine the target correction coefficient and the primary predicted sequence data of each second node.

[0124] The target correction coefficient is used to characterize the business category of the target business scenario corresponding to the target hierarchical structure.

[0125] The primary prediction sequence data of the second node includes primary prediction data of the second node at at least one prediction time point.

[0126] S303: Based on the target correction coefficient, the primary prediction sequence data of each second node is normalized by using the correction layer in the prediction model to obtain the prediction sequence data of each second node.

[0127] For example, for each prediction time point, the target conversion function configured in the correction layer of the prediction model is used to determine the data conversion value corresponding to the primary prediction sequence data of each second node associated with the first node at the prediction time point. Accordingly, for any prediction time point, the data conversion value of each second node associated with the first node at the prediction time point is normalized using the verification layer of the prediction model.

[0128] The target conversion function is a Taylor expansion function of the target order corresponding to an exponential function with e as the base.

[0129] Still taking the example that the target conversion function is configured in the correction layer, and the target conversion function is a second-order Taylor expansion function of an exponential function with e as the base, for any prediction time point, the present application can use the following formula 2 to normalize the primary prediction sequence data of the second node:

[0130]

[0131] Wherein, A is the target correction coefficient predicted by the prediction layer of the prediction model. The meanings of other parameters in Formula 2 refer to the relevant introduction of Formula 1 above and will not be repeated here.

[0132] To make it easier to understand, let's use an example:

[0133] Take the target hierarchical structure including a first node and three second nodes located at the next level of the first node and connected to the first node as an example. Among them, the historical sequence data of the first node and the three second nodes associated with the first node are input into the prediction layer of the prediction model, then the prediction layer can output the target correction coefficient A and the primary prediction sequence data of each of the three second nodes. Of course, when inputting the historical sequence data of the first node and the second node, the prediction sequence data of the first node can also be input, as described above, and will not be repeated.

[0134] On this basis, in the correction layer of the prediction model, the primary prediction sequence data of the three second nodes can be normalized according to the above formula 2, and finally the prediction sequence data of each second node can be obtained.

[0135] It can be understood that in this embodiment, the prediction model can be based on the first sequence data samples of the first sample node in the hierarchical structure sample and the second sequence data samples of multiple second sample nodes, with the predicted data of the second sample node output by the correction layer of the prediction model at at least one sample prediction time point being consistent with the actual data of the second sample node at the at least one sample prediction time point as the training target, and is obtained through training.

[0136] The second sequence data samples of the second sample node include actual data of the second sample node at at least one sample prediction time point. For each hierarchical structure sample, the second sequence data samples of the plurality of second sample nodes in the hierarchical structure sample and the first sequence data samples of the first sample node in the hierarchical structure sample satisfy the hierarchical constraint.

[0137] In this embodiment, the hierarchical structure samples may include hierarchical structure samples corresponding to a plurality of different business scenarios, each hierarchical structure sample is a two-layer hierarchical structure, and each hierarchical structure sample is the same as the component structure in the target hierarchical structure. Based on this, the first sample node is the root node of the hierarchical structure sample, and the second sample node is a node at the next level of the level where the first sample node is located and has a connection relationship with the first sample node.

[0138] The process of training the prediction model can adopt a conventional supervised training method, and there is no restriction on this.

[0139] For example, the prediction model can be trained based on at least one hierarchical structure sample in the following manner:

[0140] First, for each hierarchical structure sample, based on the first sequence data sample of the first sample node and the second sequence data samples of multiple second sample nodes in the hierarchical structure sample, the prediction layer of the prediction module is used to predict the primary prediction sequence data samples of each second sample node.

[0141] The predicted sequence data samples include predicted data of the second sample node at at least one sample prediction time point.

[0142] In order to enable the prediction model to be applicable to hierarchical structures with the same composition structure but corresponding to different business scenarios, the business scenarios corresponding to at least one hierarchical structure sample for training the prediction model in the present application may not be completely the same.

[0143] Secondly, the correction layer of the prediction model is used to correct the primary prediction sequence data samples of each second sample node to obtain the prediction sequence data samples of the second sample node, wherein the prediction sequence data samples include the prediction data of the second sample node at at least one sample prediction time point.

[0144] Finally, based on the predicted data of the second sample node at at least one sample prediction time point and the actual data of the second sample node at at least one sample prediction time point, the internal parameters of the prediction layer in the prediction model are adjusted, and based on the prediction model after the internal parameters are adjusted, the prediction layer of the prediction module is used to predict the primary prediction sequence data sample operation of each second sample node until the training end condition is met.

[0145] Among them, the training end condition can be that the number of training iterations reaches a set number, or, based on the predicted data of the second sample node at at least one sample prediction time point and the actual data of the second sample node at at least one sample prediction time point, determining that the loss function value converges, without specific restrictions.

[0146] For ease of understanding, the process of training a prediction model can be found in Figure 4, which shows an example diagram of the training process of training the prediction model in this application.

[0147] exist Figure 4 In the figure, three hierarchical structure samples of the training prediction model are shown. These three hierarchical structures are two-layer hierarchical structures. Moreover, the upper layer in each hierarchical structure sample is the first sample node, and the first sample node is connected to three second sample nodes. For example, in the first hierarchical structure sample on the left, the first sample node X 1 The three associated second sample nodes are and Among them, in the middle hierarchical structure sample, the first sample node X 2 The three associated second sample nodes are and Similarly, in the rightmost hierarchical structure sample, the first sample node X 3 The three associated second sample nodes are and

[0148] In order to make the prediction model applicable to hierarchical structures with the same composition structure but corresponding to different business scenarios, Figure 4 The business scenarios corresponding to samples at different levels of structure may not be exactly the same.

[0149] Understandably, Figure 4 The example in which the first sample node in the hierarchical structure sample is connected to three second sample nodes is used for explanation. The case in which the first sample node is connected to two, four or other numbers of second sample nodes is similar and will not be described in detail.

[0150] exist Figure 4 In the above example, ts1, ts2, ts3 and ts4 represent the historical sequence data of the first sample node and the three second sample nodes associated with the first sample node, respectively. These historical sequence data are input into the prediction layer of the prediction model. Of course, ts1 can also include the prediction sequence data samples of the first sample node. On this basis, the prediction layer will output the target correction coefficient A and the primary prediction sequence data samples of each second sample node, where the primary prediction sequence data samples of the three second sample nodes are expressed as follows: and

[0151] Then, the primary prediction sequence data samples of each second sample node are input into the correction layer of the prediction model for normalization processing. Figure 4As shown, in the correction layer of the prediction model, the primary prediction sequence data samples of each second sample node can be normalized according to the above formula 2, and finally the prediction sequence data samples of each second sample node can be obtained. The prediction sequence data samples of the three second sample nodes are expressed as follows: and The predicted sequence data samples include predicted data of the second sample node at at least one sample prediction time.

[0152] On this basis, the loss function value can be calculated based on the predicted sequence data sample of each second sample node and its actual sequence data sample. The actual sequence data sample of the second sample node includes the actual data of the second sample node at at least one sample prediction time point. Figure 4 As shown, the predicted sequence data of the three second sample nodes and The loss value loss needs to be calculated with the actual sequence data samples y1, y2 and y3 of the three second sample nodes respectively. Based on the loss value corresponding to each second sample node, the loss function value corresponding to all second sample nodes can be calculated, that is, the total loss function value. Based on the loss function value, the model parameters of the prediction layer of the prediction model can be continuously adjusted until the training conditions are met.

[0153] On this basis, in this embodiment, the target order in the target conversion function can also be determined based on the degree of discreteness of the second time series data samples of each second sample node in the hierarchical structure sample used when training the prediction model, wherein the greater the degree of discreteness of the second time series data samples of the second sample node, the higher the target order.

[0154] It should be noted that each prediction model is only applicable to one type of hierarchical structure. Therefore, even if different hierarchical structures have two layers, if the number of nodes in the corresponding layers of the two hierarchical structures is different, resulting in different composition structures of the two hierarchical structures, then the prediction models applicable to the two hierarchical structures will also be different.

[0155] It is understandable that in practical applications, the predicted data of nodes in each level of the hierarchical prediction will also be affected by the current economic situation, policy orientation or other external influencing parameters related to the target hierarchical structure (that is, external influencing parameters related to the target business scenario). Based on this, in this application, external influencing parameter information related to the target hierarchical structure can also be obtained. On this basis, this application can also combine the historical sequence data of each node and the external influencing parameter information related to the target layer structure, and use the prediction model to predict the predicted sequence data of each node. The specific prediction process is similar and will not be repeated.

[0156] The second possible implementation method of predicting the prediction data sequence of each node using the prediction model is introduced below.

[0157] In a second possible implementation, the prediction model is obtained by training with a set training target based on historical sequence data samples and actual sequence data samples of each sample node in at least one hierarchical structure sample. The actual sequence data samples of the sample node include: the actual data of the sample node at at least one sample prediction time point. The predicted sequence data samples of the sample node include the predicted data of the sample node at at least one sample prediction time point.

[0158] Among them, the set training goal is: to minimize the gap between the predicted sequence data sample of the sample node predicted by the prediction model and the actual sequence data sample of the sample node; and for each sample prediction time point, minimize the gap between the sum of the predicted data of the second sample nodes associated with the first sample node in the hierarchical structure sample at the sample prediction time point and the predicted data of the first sample node at the sample prediction time point.

[0159] The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node located at the next level of the level where the first sample node is located in the hierarchical structure sample and connected to the first sample node.

[0160] It can be understood that minimizing the difference between the sum of the predicted data of the second sample nodes associated with the first sample node at the sample prediction time point and the predicted data of the first sample node at the sample prediction time point essentially requires that the predicted data between the sample nodes of each layer satisfy the hierarchical constraints, which naturally makes it possible for the predicted data of each node predicted by the trained prediction model at the prediction time point to satisfy the hierarchical constraints.

[0161] Based on this, in this possible implementation method, by setting the training target of the prediction model, not only can the prediction model accurately predict the prediction data of each node at the prediction time point, but also the prediction data of the nodes predicted by the prediction model at the prediction time point can satisfy the hierarchical constraints. Therefore, using the prediction model to predict the prediction data of the nodes in the target hierarchical structure at the prediction time point not only ensures the accuracy of the prediction data, but also avoids reconciling the prediction data of the nodes separately, thereby reducing the situation where the accuracy of the prediction data is low due to drastic changes in the prediction data caused by the reconciliation of separate data.

[0162] In an optional manner, considering that the predicted data of the node at the predicted time point after the current moment may be a data interval, therefore, if only a single value at a predicted time point is predicted, it may not accurately reflect the actual data situation of the node at the predicted time point. Based on this, in the present application, based on the historical sequence data of each node in the target hierarchical structure, the predicted sequence data of the node is determined using a prediction model: based on the historical sequence data of each node in the target hierarchical structure, the predicted marginal distribution sequence of each node is determined using a prediction model. Among them, the predicted marginal distribution sequence of the node includes the marginal distribution of the node at at least one predicted time point.

[0163] For example, the marginal distribution of a node at a prediction time point can be represented by the mean and variance of the prediction data of the node at the prediction time point. Therefore, the prediction model can predict the mean and variance corresponding to the marginal distribution of the node at each prediction time point.

[0164] It can be understood that at each prediction time point, a marginal distribution is used to represent the possible data situation of the node at the prediction time point, which can accurately reflect the actual data distribution of the node at the prediction time point, and thus can more accurately reflect the data situation of the node after the current moment.

[0165] When the prediction data of the node predicted by the prediction model is a marginal distribution, the process and training objectives of training the prediction model are similar to the training requirements in the second possible implementation method mentioned above, except that the prediction data of the sample node at the sample prediction time point can be estimated based on the marginal distribution of the sample node at the sample prediction time point, and then it is determined whether the training objectives are met. The details are as described above and will not be repeated here.

[0166] Furthermore, in order to intuitively and accurately determine the prediction sequence data composed of the prediction data of the node at at least one prediction time point, the prediction model in the present application predicts the marginal distribution of each node at at least one prediction time point, and also predicts the connection parameter sequence corresponding to each level in the target hierarchical structure. Combining the connection parameter sequence and the predicted marginal distribution sequence of each node, the prediction data of each node at each prediction time point can be determined. Figure 5 Provide explanation.

[0167] like Figure 5 , shows another flow chart of the data prediction method provided by the present application. The method of this embodiment may include:

[0168] S501, obtaining historical sequence data of each node in the target hierarchical structure.

[0169] The target hierarchical structure is used to represent the hierarchical relationship between different objects to be predicted in the target business scenario. The nodes in the hierarchical structure are used to represent the objects to be predicted in the target business scenario.

[0170] The historical sequence data of a node includes data of the node at at least one historical time point.

[0171] S502, based on the historical sequence data of each node in the target hierarchical structure, using the prediction model to determine the predicted marginal distribution sequence of each node.

[0172] The predicted marginal distribution sequence includes the marginal distribution of the nodes at at least one predicted time point.

[0173] For example, the prediction model can predict the marginal distribution parameters of each node at at least one prediction time point, and the marginal distribution parameters at a prediction time point are used to characterize the marginal distribution of the node at the prediction time point. The marginal distribution parameters may include the mean and standard deviation of the marginal distribution.

[0174] S503, based on the historical sequence data of each node in the target hierarchical structure, using the prediction model to determine the connection parameter sequence of each level in the target hierarchical structure.

[0175] The connection parameter sequence of each level includes the connection parameters of the level at at least one prediction time point. The connection parameters are parameters required for the connection function to connect multiple marginal distributions. The connection parameters may include at least one parameter.

[0176] For example, the connection function connecting the marginal distributions may be a copula function, and the connection parameters are the parameters required to be referenced by the copula function to connect the marginal distributions. Of course, other functions for connecting marginal distributions may also be used, and there is no limitation on this.

[0177] S504, for each level in the target hierarchical structure, for each prediction time point respectively, based on the connection parameters of the level at the prediction time point, the marginal distribution of each node in the level at the prediction time point is connected to obtain the joint distribution of each node in the level at the prediction time point.

[0178] In the present application, there is no limitation on the specific implementation method of connecting multiple marginal distributions into a joint distribution.

[0179] For example, for each prediction time point, based on the connection parameters corresponding to the level, the connection function is used to connect the marginal distributions of each node in a level at the prediction time point into a joint distribution.

[0180] Taking the Gaussian copula function as an example, an ultra-high dimensional covariance matrix is ​​determined based on the connection parameters, and the marginal distributions are connected based on the ultra-high dimensional covariance matrix to obtain a joint distribution. In order to reduce the amount of calculation, the low-rank approximation method can be used to achieve the connection of marginal distributions during the marginal distribution connection process.

[0181] It can be understood that the joint distribution corresponding to a level can not only characterize the predicted data of each node in the level at a prediction time point, but also reflect the relationship between the predicted data of different nodes in the level at the prediction time point, thereby more comprehensively characterizing the data characteristics of each node in the level.

[0182] S505, based on the joint distribution of each node in the layer at the prediction time point, sample the prediction data of each node in the layer at the prediction time point, and obtain prediction sequence data composed of the prediction data of each node in the layer at at least one prediction time point.

[0183] There are many possible implementations for sampling the prediction data of each node in the layer at the prediction time point from the joint distribution of a layer at a prediction time point, and there are no restrictions on this. For example, the Markov Chain Monte Carlo method (MCMC) can be used to sample the prediction data of each node from the joint distribution. Of course, the prediction data of each node can also be extracted by cumulative density function, and there is no restriction on this.

[0184] Among them, for any node in this level, after extracting the prediction data of the node at each prediction time point, the prediction data of the node at each prediction time point can constitute the prediction sequence data of the node.

[0185] In this embodiment, the prediction model determines the predicted marginal distribution sequence of each node and the connection parameters of each level at at least one prediction time point based on the historical sequence data of each node in the target hierarchical structure. On this basis, the present application will connect the marginal distribution of each node in the level at the prediction time point for each prediction time point, combined with the connection parameters of the level at the prediction time point, to obtain the joint distribution between the nodes in the level. Since the marginal distribution of the node at the prediction time point can accurately reflect the data distribution of the node at the prediction time point, and after the marginal distribution of each node on the same level is connected as a joint distribution, the joint distribution can not only accurately characterize the data characteristics of each node in the level at the prediction time point, but also characterize the data relationship between different nodes in the level. Based on this, based on the joint distribution corresponding to the level, the prediction data of each node in the level at the prediction time point can be more accurately determined, so that the accuracy of the prediction sequence data of each node finally determined is higher.

[0186] In this embodiment, the training objective of training the prediction model is the same as described above.

[0187] In one possible implementation, in order to improve the training effect of the prediction model, the prediction model is trained based on the historical sequence data samples and actual sequence data samples of each sample node in at least one hierarchical structure sample with a set training objective. As mentioned above, the actual sequence data samples include the actual data of the sample node at at least one sample prediction time point.

[0188] The training objectives are as follows: for each sample prediction time point, minimize the gap between the predicted data of each sample node at the sample prediction time point and the actual data of the sample node at the sample prediction time point; and minimize the gap between the predicted data distribution of the first sample node and the total predicted data distribution of each second sample node associated with the first sample node at the sample prediction time point.

[0189] As described above, the first sample node in the hierarchical sample is a non-leaf node in the hierarchical sample, and the second sample node associated with the first sample node is a sample node located at the next level of the level where the first sample node is located in the hierarchical sample and connected to the first sample node.

[0190] The prediction data distribution of the first sample node is the distribution of the prediction data of the first sample node at the same position in at least one hierarchical structure sample at the sample prediction time point. In other words, the prediction data distribution of the first sample node is the distribution of the prediction data of the first sample nodes at the same position in all hierarchical structure samples at the same sample prediction time point.

[0191] The composition structures of samples of different hierarchical structures are the same, but the objects represented by nodes at the same position at the same level in different hierarchical structures may be different.

[0192] For ease of understanding, combined Figure 6 illustrate, Figure 6 An example diagram showing two hierarchical structure samples with the same composition structure. Figure 6 The two hierarchical structure samples have the same composition structure, both have three layers, and the number of nodes and the connection relationship between different layers are the same. However, since these three hierarchical structures can belong to hierarchical structure samples in different business scenarios, the objects represented by the nodes at the same position in different hierarchical structure samples can be different, such as Figure 6 The nodes at the same position in samples of different hierarchical structures represent different objects. Therefore, the characters representing the nodes at the same position in different hierarchical structures are different.

[0193] On this basis, taking the predicted data distribution corresponding to the node at the middle level and the leftmost position in the two hierarchical structure samples as an example, the node at this position in each hierarchical structure sample is not a leaf node. Therefore, the node at this position belongs to the first node. For any sample prediction time point, the predicted data distribution corresponding to the first node at this position is the distribution composed of the predicted data of node a21 at the sample prediction time point and the predicted data of node b21 at the sample prediction time point.

[0194] Among them, for any one of the first sample node and the second sample node, the prediction data of the sample node at the sample prediction time point is determined based on the sample prediction marginal distribution sequence of each sample node and the sample connection parameter sequence of different levels in the hierarchical structure sample after using the prediction model to predict the sample prediction marginal distribution sequence of each sample node and the sample connection parameter sequence of different levels in the hierarchical structure sample based on the historical sequence data samples of each sample node in at least one hierarchical structure sample.

[0195] For the sake of distinction, the predicted marginal distribution sequence of the sample node is called the sample predicted marginal distribution sequence. Therefore, the sample predicted marginal distribution sequence may include the marginal distribution of the sample node at at least one sample prediction time point. The process of using the prediction model to determine the sample predicted marginal distribution sequence of the sample node at the sample prediction time point is similar to the process of determining the predicted marginal distribution sequence of the node at the prediction time point, and will not be repeated.

[0196] Similarly, for the sake of distinction, the connection parameter sequence corresponding to each level in the hierarchical sample is called a sample connection parameter sequence, and therefore, the sample connection parameter sequence may include the sample connection parameters of the level at at least one sample prediction time point. For the sake of distinction, the connection parameters of each level in the hierarchical sample at the sample prediction time point are called sample connection parameters. The process of determining the sample connection parameter sequence corresponding to each level in the hierarchical sample can refer to the process of determining the connection parameter sequence of each level in the target hierarchical structure, and will not be repeated here.

[0197] The distribution of the total predicted data of each second sample node associated with the first sample node at the sample prediction time point is the distribution of the total target predicted data corresponding to each first sample node at the same position in at least one hierarchical structure sample. The total target predicted data corresponding to the first sample node is the total predicted data of each second sample node associated with the first sample node at the sample prediction time point.

[0198] For ease of understanding, Figure 6 To illustrate, we still take the first sample node in the middle level and the leftmost position in the two hierarchical structure samples as an example. For a sample prediction time point, for the hierarchical structure sample on the left, the first sample node is node a21, and the second sample nodes associated with node a21 include nodes a31 and a32. Based on this, the sum of the target prediction data corresponding to node a21 is: the sum of the prediction data of node a31 at the prediction time point and the prediction data of node a32 at the prediction time point. Similarly, for Figure 6 For the hierarchical structure samples on the right side, the first sample node is node b21, and the sum of target prediction data corresponding to node b21 is: the sum of the prediction data of node b31 at the prediction time point and the prediction data of node b32 at the prediction time point.

[0199] On this basis, the distribution of the sum of target prediction data corresponding to the first sample nodes at the middle level and at the leftmost position in the two hierarchical structure samples is: the sum of target prediction data corresponding to node a21 and the sum of target prediction data corresponding to node b21.

[0200] It can be understood that the purpose of minimizing the gap between the predicted data distribution of the first sample node and the total predicted data distribution of each second sample node associated with the first sample node at the sample prediction time point is to ensure that the predicted data of the nodes in adjacent layers predicted by the trained prediction model meet the hierarchical constraints.

[0201] In order to facilitate understanding, the implementation process of training the prediction model in this implementation method is described below using one implementation method as an example. Figure 7 , shows a flow chart of a method for training a prediction model provided in an embodiment of the present application, and this embodiment may include:

[0202] S701, obtaining at least one hierarchical structure sample and a historical sequence data sample and an actual sequence data sample of each sample node in each hierarchical structure sample.

[0203] The historical sequence data sample of the sample node includes data of the sample node at at least one sample historical time point (also referred to as historical data). Correspondingly, the actual sequence data sample of the sample node includes actual data of the sample node at at least one sample prediction time point.

[0204] S702, for each hierarchical sample, based on the historical sequence data of each sample node in the hierarchical sample, using the prediction model to be trained, determine the sample prediction marginal distribution sequence of each sample node and the sample connection parameter sequence of each sample level in the hierarchical sample.

[0205] In this embodiment, for the sake of distinction, each level in the hierarchical structure sample is referred to as a sample level. The connection parameter sequence of the sample level is referred to as a sample connection parameter sequence, and accordingly, the sample connection parameter sequence may include the connection parameters of the sample level at at least one sample prediction time point.

[0206] The sample prediction marginal distribution sequence of the sample node includes the marginal distribution of the sample node at at least one sample prediction time point.

[0207] S703, for each sample level in the hierarchical structure sample and for each sample prediction time point, based on the connection parameters of the sample level at the sample prediction time point, the marginal distributions of each sample node in the sample level at the sample prediction time point are connected to obtain the joint distribution of each sample node in the sample level at the sample prediction time point.

[0208] S704, based on the joint distribution of each sample node in the sample level at the sample prediction time point, sampling the prediction data of each sample node in the sample level at the prediction time point, and obtaining the prediction data of each sample node in the sample level at least at the sample prediction time point.

[0209] S705, based on the predicted data and actual data of each sample node in each hierarchical structure sample at each prediction time point, determine whether the current training objective is met. If yes, end the training and obtain the trained prediction model; if not, execute step S706.

[0210] In this embodiment, the training goal can be satisfied when the gap between the predicted data of each sample node at the sample prediction time point and its actual data is currently the smallest and has converged; and at each sample prediction time point, the gap between the predicted data distribution of the first sample node in at least one hierarchical structure sample and the total distribution of the predicted data of each second sample node associated with the first sample node at the sample prediction time point is the smallest and has converged. Of course, the training goal can also be satisfied when the training iteration conflict reaches a set number of times.

[0211] In a possible implementation, the present application calculates the comprehensive loss function value based on the predicted data and actual data of each sample node in each hierarchical structure sample at each prediction time point, and confirms that the training goal has been achieved when the comprehensive loss function value converges. In this embodiment, the comprehensive loss function value consists of two parts, one part is the first loss function value corresponding to the gap between the predicted data of each sample node at the sample prediction time point and its actual data; the other part is the second loss function value determined based on the gap between the predicted data distribution of each first sample node in at least one hierarchical structure sample and the total predicted data distribution of each second sample node associated with it at the sample prediction time point.

[0212] For example, the first loss function value may be a loss function value calculated using a maximum likelihood loss function based on predicted data and actual data of each sample node in each hierarchical structure sample at each sample prediction time point.

[0213] Considering that the second loss function reflects the gap between the predicted data distribution corresponding to the first sample node at the same position in at least one hierarchical sample and the predicted data sum distribution, the present application can use relative entropy to calculate the relative entropy between the two distributions corresponding to the first sample node at the same position in each hierarchical sample for the first sample node at each position in at least one hierarchical sample, so as to determine the gap (i.e., distance) between the two distributions. Relative entropy is also called KL divergence (Kullback-Leibler) or information divergence, which is used to measure the asymmetry of the difference between two probability distributions.

[0214] Furthermore, considering that in practical applications, users may pay more attention to the accuracy of the predicted data of each node in a certain layer of the hierarchical structure, therefore, users may hope that the predicted data of each node in a certain layer of the hierarchical structure is more accurate. Based on this, in the process of calculating the comprehensive loss function value, the present application may also have different weights for different sample levels. On this basis, combined with the weights corresponding to each sample level, and the predicted data and actual data of the sample nodes in each level at at least one prediction time point, a weighted summation method is used to calculate the sum of the first loss function values ​​of all sample nodes and the sum of the second loss function values ​​of all first sample nodes to obtain the comprehensive loss function value.

[0215] Based on this, in the process of training the prediction model, the weights corresponding to each sample level can also be continuously adjusted. For example, assuming that after training a set number of rounds of prediction models, for the target sample level set in the hierarchical structure sample, this application can settle the gap between the real data and the predicted data of each sample node in the target sample level in each hierarchical structure sample at at least one prediction time point, so as to obtain the comprehensive prediction accuracy of each sample node in the target sample level. Among them, the target sample level is the sample level that needs to be focused on.

[0216] On this basis, based on the comprehensive prediction accuracy, the weights corresponding to the target sample level and other sample levels can be adjusted. For example, based on the comprehensive prediction accuracy of the target sample level, the Bayesian optimization algorithm can be used to optimize the weights corresponding to each sample level. After optimizing the weight coefficients of each sample level, the comprehensive prediction accuracy of each sample node in the target sample level is recalculated, and the operation of adjusting the weight coefficient is repeated until the comprehensive prediction accuracy of each sample node in the target sample level meets the set requirements.

[0217] For ease of understanding, the process of training the prediction model in this embodiment is combined with Figure 8 A principle framework example of training a prediction model is shown for simple explanation.

[0218] Depend on Figure 8 : Obtain multiple hierarchical structure samples for training the prediction model, and the composition structure of these multiple hierarchical structure samples is the same. Figure 8 Only one sample of the hierarchy is shown as an example, and Figure 8 In the example, a hierarchical structure sample having three levels is taken as an example. If the hierarchical structure sample has other component structures, the same is true.

[0219] Among them, the historical sequence data samples and actual sequence data samples of each sample node in the hierarchical structure sample are known. On this basis, for each hierarchical structure sample, after the historical sequence data samples and actual sequence data samples of each sample node in the hierarchical structure sample are input into the prediction model to be trained, the prediction model can output the sample prediction marginal distribution sequence of each sample node and the sample connection parameter sequence corresponding to each sample level in the hierarchical structure sample. The sample prediction marginal distribution sequence includes the marginal distribution of the sample node at at least one sample prediction time point, and the sample connection parameter sequence includes the connection parameters of the sample level at at least one sample time point.

[0220] For each sample prediction time point, according to the specific implementation method mentioned above, the marginal distributions of each sample node in each sample level are connected, and the prediction data of each sample node at the sample prediction time point is extracted from the joint distribution obtained by the connection.

[0221] On this basis, as mentioned above, based on the predicted data and real data of each sample node in each hierarchical structure sample, this application will consider the similarity between the predicted data and the real data of each sample node when determining the loss function value of the prediction model. Therefore, for the maximum likelihood loss function value between the predicted data and the real data of each sample node at the same position in each hierarchical structure sample, such as, Figure 8 , the maximum likelihood loss of node 1 can be the maximum likelihood loss function value calculated based on the predicted data and real data of each root node in each hierarchical structure sample; similarly, for each node at the same position as node 2 in different hierarchical structure samples, the corresponding maximum likelihood loss function value also needs to be calculated. Figure 8 It is represented as the maximum likelihood loss of node 2. Similarly, for each node in other sample levels in each hierarchical structure sample, the maximum likelihood loss function value of each node at the corresponding position in the same sample level of each hierarchical structure sample is calculated respectively.

[0222] At the same time, if Figure 8 As shown, when calculating the loss, this application will also consider whether the predicted data of the sample nodes with connection relationships between different levels in the hierarchical structure sample meet the hierarchical constraints. Figure 8 It is necessary to calculate the KL divergence between the predicted data distribution and the predicted data sum distribution mentioned above for each sample node at the same position in multiple levels of samples. Correspondingly, the comprehensive loss function value includes two parts of loss calculated based on the maximum likelihood loss and KL divergence. On this basis, the present application can adjust the model parameters of the prediction model based on the comprehensive loss function.

[0223] Moreover, if Figure 8As shown in the figure, when calculating each loss corresponding to each sample node at the same position in the same sample level in each hierarchical structure sample, the weight coefficient corresponding to the sample level where the sample node is located will be taken into account. Among them, the initial weight coefficient corresponding to each sample level can be set randomly. In the process of training the prediction model, the prediction accuracy corresponding to the target sample level can be determined by combining the difference between the predicted data and the real data of each sample node in the target sample level. Based on the prediction accuracy, the weight coefficient of each sample level is continuously optimized.

[0224] S706, adjust the model parameters of the prediction model and return to step S702.

[0225] A data prediction method provided by an embodiment of the present application is introduced above, and a device for executing the above data prediction method will be introduced below.

[0226] See also Fig. 9 , Fig. 9 Schematic diagram of the structure of a data prediction device provided in an embodiment of the present application. Fig. 9 As shown, the data prediction device may include:

[0227] A data acquisition unit 901 is used to obtain historical sequence data of each node in a target hierarchical structure, wherein the target hierarchical structure is used to characterize the hierarchical relationship between different objects to be predicted in a target business scenario, the node is used to represent the object in the target business scenario, and the historical sequence data of the node includes data of the node at at least one historical time point;

[0228] A sequence prediction unit 902, configured to determine predicted sequence data of each node in the target hierarchical structure using a prediction model based on historical sequence data of each node, wherein the predicted sequence data of the node includes predicted data of the node at at least one prediction time point;

[0229] In the process of determining the prediction sequence data of the node, the prediction model controls the prediction sequence data of nodes at different levels to satisfy the hierarchical constraints.

[0230] In a possible implementation, the sequence prediction unit includes:

[0231] The first sequence prediction unit is used to determine the primary prediction sequence data of each node based on the historical sequence data of each node in the target hierarchical structure using a prediction model, and correct the primary prediction sequence data of the node to obtain the prediction sequence data of each node.

[0232] In a possible implementation, the device further includes: a root data obtaining unit, configured to obtain predicted sequence data of a root node in the target hierarchical structure:

[0233] The first sequence prediction unit comprises:

[0234] A primary prediction subunit, configured to determine primary prediction sequence data of each node except the root node using a prediction layer in a prediction model based on the historical sequence data of each node in the target hierarchical structure and the prediction sequence data of the root node;

[0235] A correction subunit is used to normalize the primary prediction sequence data of each second node associated with the first node in the target hierarchical structure that is not a leaf node, using the correction layer in the prediction model to obtain the prediction sequence data of each second node, wherein the second node associated with the first node is a node that is at the next level of the level where the first node is located and is connected to the first node.

[0236] In yet another possible implementation, the primary prediction sequence data of the node obtained by the data obtaining unit includes primary prediction data of the node at at least one prediction time point;

[0237] The correction subunit comprises:

[0238] A data conversion subunit is used to determine, for each prediction time point, a data conversion value corresponding to the primary prediction sequence data of the second node associated with the first node at the prediction time point using a target conversion function configured in the correction layer of the prediction model, wherein the target conversion function is a Taylor expansion function of a target order corresponding to an exponential function with e as the base;

[0239] A normalization subunit is used to combine the data conversion values ​​of each second node associated with the first node at the prediction time point, and use the verification layer of the prediction model to normalize the data conversion value of each second node at the prediction time point.

[0240] In another possible implementation, the primary prediction subunit is specifically used to determine a target correction coefficient and primary prediction sequence data of each node except the root node using a prediction layer in a prediction model based on historical sequence data of each node in the target hierarchical structure and prediction sequence data of the root node, wherein the target correction coefficient is used to characterize a business category of a target business scenario corresponding to the target hierarchical structure;

[0241] The correction subunit is specifically used to normalize the primary prediction sequence data of each second node associated with the first node based on the target correction coefficient and using the correction layer in the prediction model.

[0242] In another possible implementation, the prediction model used in the first sequence prediction unit is based on historical sequence data samples of each sample node in at least one hierarchical structure sample, and is obtained through training with the prediction model predicting and correcting the predicted sequence data samples of the sample nodes consistent with the actual sequence data samples of the sample nodes as the training target;

[0243] Wherein, for any first sample node that is not a leaf node in the hierarchical structure sample, the actual sequence data sample of the second sample node associated with the first sample node satisfies the hierarchical constraint with the actual sequence data sample of the first sample node;

[0244] The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node in the hierarchical structure sample that is located at the next level of the level where the first sample node is located and is connected to the first sample node.

[0245] In another possible implementation, the prediction model used in the sequence prediction unit is obtained by training with a set training target based on historical sequence data samples and actual sequence data samples of each sample node in at least one hierarchical structure sample, wherein the actual sequence data samples of the sample node include: actual data of the sample node at at least one sample prediction time point;

[0246] The set training objectives are: to minimize the gap between the predicted sequence data sample of the sample node predicted by the prediction model and the actual sequence data sample of the sample node; and to minimize the gap between the sum of the predicted data of each second sample node associated with the first sample node in the hierarchical structure sample at the sample prediction time point and the predicted data of the first sample node at the sample prediction time point;

[0247] The prediction sequence data sample of the sample node includes the prediction data of the sample node at the at least one sample prediction time point;

[0248] Among them, the first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node located in the next level of the level where the first sample node is located in the hierarchical structure sample and connected to the first sample node.

[0249] In a possible implementation, the sequence prediction unit includes:

[0250] The second sequence prediction unit is used to determine the predicted marginal distribution sequence of each node based on the historical sequence data of each node in the target hierarchical structure using a prediction model, wherein the predicted marginal distribution sequence includes the marginal distribution of the node at at least one prediction time point.

[0251] In yet another possible implementation, the sequence prediction unit further includes:

[0252] A parameter prediction unit, configured to determine, based on the historical sequence data of each node in the target hierarchical structure, a connection parameter sequence of each level in the target hierarchical structure using the prediction model, wherein the connection parameter sequence of each level includes a connection parameter of the level at at least one prediction time point;

[0253] a distribution connection unit, configured to connect, for each level in the target hierarchical structure, the marginal distributions of the nodes in the level at the prediction time point based on the connection parameters of the level at the prediction time point, to obtain the joint distribution of the nodes in the level at the prediction time point;

[0254] A data extraction unit is used to sample the prediction data of the nodes in the level at the prediction time point based on the joint distribution of each node in the level at the prediction time point, and obtain prediction sequence data composed of the prediction data of the nodes in the level at at least one prediction time point.

[0255] In another possible implementation, the prediction model adopted by the second sequence prediction unit and the parameter prediction unit is obtained by training with a set training target based on historical sequence data samples of each sample node in at least one hierarchical structure sample and actual sequence data samples of the sample node, wherein the actual sequence data samples include actual data of the sample node at at least one sample prediction time point;

[0256] The training objectives are: minimizing the gap between the predicted data of the sample node at the sample prediction time point and the actual data; and minimizing the gap between the predicted data distribution of the first sample node and the total predicted data distribution of each second sample node associated with the first sample node at the sample prediction time point;

[0257] The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node located at a level below the level of the first sample node in the hierarchical structure sample and connected to the first sample node;

[0258] The predicted data distribution of the first sample node is the distribution of the predicted data of the first sample node located at the same position in the at least one hierarchical structure sample at the sample prediction time point;

[0259] The distribution of the total predicted data of each second sample node associated with the first sample node at the sample prediction time point is a distribution consisting of the total target predicted data corresponding to each first sample node at the same position in the at least one hierarchical structure sample, wherein the total target predicted data corresponding to the first sample node is the total predicted data of each second sample node associated with the first sample node at the sample prediction time point.

[0260] The present application also provides an electronic device. Fig.10 As shown, it shows a schematic diagram of a composition structure of the electronic device, and the electronic device at least includes a processor 1001 and a memory 1002;

[0261] The processor 1001 is used to execute the data prediction method described in any one of the above embodiments;

[0262] The memory 1002 is used to store the program required by the processor to perform operations

[0263] It can be understood that the electronic device may further include a display unit 1003 and an input unit 1004 .

[0264] Of course, the electronic device may also have Fig.10 There may be more or fewer components, without limitation.

[0265] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any data prediction method provided in the embodiment of the present application.

[0266] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any data prediction method provided in the embodiment of the present application.

[0267] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0268] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0269] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0270] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A data prediction method, comprising: Obtaining historical sequence data of each node in a target hierarchical structure, wherein the target hierarchical structure is used to characterize a hierarchical relationship between different objects to be predicted in a target business scenario, the nodes are used to represent the objects in the target business scenario, and the historical sequence data of the nodes includes data of the nodes at at least one historical time point; Based on the historical sequence data of each node in the target hierarchical structure, using a prediction model to determine the prediction sequence data of the node, the prediction sequence data of the node including the prediction data of the node at at least one prediction time point; In the process of determining the prediction sequence data of the node, the prediction model controls the prediction sequence data of nodes at different levels to satisfy the hierarchical constraints.

2. The data prediction method according to claim 1, wherein the step of determining the predicted sequence data of each node in the target hierarchical structure using a prediction model based on the historical sequence data of each node comprises: Based on the historical sequence data of each node in the target hierarchical structure, the primary prediction sequence data of each node is determined using a prediction model, and the primary prediction sequence data of the node is corrected to obtain the prediction sequence data of each node.

3. The data prediction method according to claim 2, further comprising: Obtain the predicted sequence data of the root node in the target hierarchical structure: The method of determining primary prediction sequence data of each node based on the historical sequence data of each node in the target hierarchical structure by using a prediction model and correcting the primary prediction sequence data of the node includes: Based on the historical sequence data of each node in the target hierarchical structure and the predicted sequence data of the root node, the prediction layer in the prediction model is used to determine the primary predicted sequence data of each node except the root node; For the first node that is not a leaf node in the target hierarchical structure, the correction layer in the prediction model is used to normalize the primary prediction sequence data of each second node associated with the first node to obtain the prediction sequence data of each second node. The second node associated with the first node is a node that is at the next level of the level where the first node is located and is connected to the first node.

4. The data prediction method according to claim 3, wherein the primary prediction sequence data of the node comprises primary prediction data of the node at at least one prediction time point; The normalizing process of the primary prediction sequence data of each second node associated with the first node by using the correction layer in the prediction model includes: For each prediction time point, using the target conversion function configured in the correction layer of the prediction model, determining a data conversion value corresponding to the primary prediction sequence data of the second node associated with the first node at the prediction time point; In combination with the data conversion values ​​of each second node associated with the first node at the prediction time point, the data conversion value of each second node at the prediction time point is normalized using the verification layer of the prediction model; The target conversion function is a Taylor expansion function of a target order corresponding to an exponential function with e as the base.

5. The data prediction method according to claim 3, wherein the step of determining the primary prediction sequence data of each node except the root node by using the prediction layer in the prediction model based on the historical sequence data of each node in the target hierarchical structure and the prediction sequence data of the root node comprises: Based on the historical sequence data of each node in the target hierarchical structure and the predicted sequence data of the root node, a target correction coefficient and primary predicted sequence data of each node except the root node are determined using a prediction layer in a prediction model, wherein the target correction coefficient is used to characterize a business category of a target business scenario corresponding to the target hierarchical structure; The normalizing process of the primary prediction sequence data of each second node associated with the first node by using the correction layer in the prediction model includes: Based on the target correction coefficient, the primary prediction sequence data of each second node associated with the first node is normalized using the correction layer in the prediction model.

6. The data prediction method according to claim 2, wherein the prediction model is obtained by training based on historical sequence data samples of each sample node in at least one hierarchical structure sample, with the prediction sequence data samples of the sample node predicted by the prediction model and obtained after correction being consistent with the actual sequence data samples of the sample node as the training target; in, For any first sample node that is not a leaf node in the hierarchical structure sample, the actual sequence data sample of the second sample node associated with the first sample node satisfies the hierarchical constraint with the actual sequence data sample of the first sample node; The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node in the hierarchical structure sample that is located at the next level of the level where the first sample node is located and is connected to the first sample node.

7. The data prediction method according to claim 1, wherein the prediction model is obtained by training with a set training target based on historical sequence data samples and actual sequence data samples of each sample node in at least one hierarchical structure sample, wherein: The actual sequence data sample of the sample node includes: actual data of the sample node at at least one sample prediction time point; The set training objectives are: to minimize the gap between the predicted sequence data sample of the sample node predicted by the prediction model and the actual sequence data sample of the sample node; and to minimize the gap between the sum of the predicted data of each second sample node associated with the first sample node in the hierarchical structure sample at the sample prediction time point and the predicted data of the first sample node at the sample prediction time point; The prediction sequence data sample of the sample node includes the prediction data of the sample node at the at least one sample prediction time point; Among them, the first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node located in the next level of the level where the first sample node is located in the hierarchical structure sample and connected to the first sample node.

8. The data prediction method according to claim 1 or 7, wherein the step of determining the predicted sequence data of each node in the target hierarchical structure using a prediction model based on the historical sequence data of each node comprises: Based on the historical sequence data of each node in the target hierarchical structure, a prediction model is used to determine a prediction marginal distribution sequence of each node, wherein the prediction marginal distribution sequence includes the marginal distribution of the node at at least one prediction time point.

9. The data prediction method according to claim 8, wherein the step of determining the predicted sequence data of each node in the target hierarchical structure by using a prediction model based on the historical sequence data of each node further comprises: Based on the historical sequence data of each node in the target hierarchical structure, the connection parameter sequence of each level in the target hierarchical structure is determined by using the prediction model, wherein the connection parameter sequence of each level includes the connection parameters of the level at at least one prediction time point; For each level in the target hierarchical structure, based on the connection parameters of the level at the prediction time point, the marginal distributions of the nodes in the level at the prediction time point are connected to obtain the joint distribution of the nodes in the level at the prediction time point; Based on the joint distribution of each node in the layer at the prediction time point, the prediction data of the node in the layer at the prediction time point is sampled to obtain prediction sequence data composed of the prediction data of the node in the layer at at least one prediction time point.

10. The data prediction method according to claim 9, wherein the prediction model is obtained by training with a set training target based on historical sequence data samples of each sample node in at least one hierarchical structure sample and actual sequence data samples of the sample node, wherein the actual sequence data samples include actual data of the sample node at at least one sample prediction time point; The training goal is to minimize the gap between the predicted data and the actual data of the sample node at the sample prediction time point; Furthermore, minimizing the difference between the predicted data distribution of the first sample node and the summed distribution of predicted data of each second sample node associated with the first sample node at the sample prediction time point; The first sample node in the hierarchical structure sample is a non-leaf node in the hierarchical structure sample, and the second sample node associated with the first sample node is a sample node located at a level below the level of the first sample node in the hierarchical structure sample and connected to the first sample node; The predicted data distribution of the first sample node is the distribution of the predicted data of the first sample node located at the same position in the at least one hierarchical structure sample at the sample prediction time point; The distribution of the total predicted data of each second sample node associated with the first sample node at the sample prediction time point is a distribution consisting of the total target predicted data corresponding to each first sample node at the same position in the at least one hierarchical structure sample, wherein the total target predicted data corresponding to the first sample node is the total predicted data of each second sample node associated with the first sample node at the sample prediction time point.

11. A data prediction device, comprising: a data acquisition unit, configured to acquire historical sequence data of each node in a target hierarchical structure, wherein the target hierarchical structure is used to characterize the hierarchical relationship between different objects to be predicted in a target business scenario, the nodes are used to represent the objects in the target business scenario, and the historical sequence data of the nodes includes data of the nodes at at least one historical time point; A sequence prediction unit, configured to determine predicted sequence data of each node in the target hierarchical structure using a prediction model based on historical sequence data of each node, wherein the predicted sequence data of the node includes predicted data of the node at at least one prediction time point; In the process of determining the prediction sequence data of the node, the prediction model controls the prediction sequence data of nodes at different levels to satisfy the hierarchical constraints.