Updating method and application method of hierarchical prediction model, and storage medium

By introducing collision prediction sub-models into the hierarchical prediction model, a prediction hierarchical data sequence and collision probability sequence are generated, and the hierarchical prediction model is updated, which solves the collision problem of hierarchical results and improves the overall performance and application effect of the model.

CN119940559APending Publication Date: 2025-05-06BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311466139.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, the hierarchical results of various hierarchical methods output by hierarchical prediction model may collide, resulting in a decline in the overall performance of the model and affecting the use effect.

Method used

Add a collision prediction sub-model to the hierarchical prediction model. By inputting the characteristic data of the target item, a predicted hierarchical data sequence output by the hierarchical prediction sub-model and a predicted collision probability sequence output by the collision prediction sub-model are generated, and the hierarchical prediction model is updated based on these outputs.

Benefits of technology

The impact of collisions between stratified results on the overall performance of the model is reduced, the effectiveness of the model is improved, and it is more conducive to the widespread application of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940559A_ABST
    Figure CN119940559A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a hierarchical prediction model updating method, an application method and a storage medium, and relates to the technical field of computers, and the method can comprise the steps: inputting the feature data of a target object into a hierarchical prediction model, obtaining each prediction hierarchical data sequence which is output by a hierarchical prediction sub-model and aims at each hierarchical mode, obtaining each predicted collision probability sequence which is output by the collision prediction sub-model and aims at each predicted hierarchical data sequence; and updating the hierarchical prediction model based on each prediction hierarchical data sequence, each prediction collision probability sequence and each actual hierarchical result corresponding to each prediction hierarchical data sequence. By adopting the technical scheme of the embodiment of the invention, the hierarchical prediction model can be iterated towards the direction with smaller collision probability. Therefore, the influence of collision between the layering results on the overall performance of the layering prediction model can be reduced, so that the use effect of the layering prediction model can be improved, and wide application of the model is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to an updating method, an application method, and a storage medium of a hierarchical prediction model. Background Art

[0002] At present, in order to meet the business needs of accurate operation and accurate promotion of items in the big data network environment, various hierarchical dimensions (such as resource demand, delivery probability, etc.) can be used to stratify items to different levels. Moreover, for the same hierarchical dimension, different stratification methods (such as different numbers of divided levels) can also be used to stratify items.

[0003] In some operation / promotion scenarios, there may be a need to stratify items using multiple stratification methods under the same stratification dimension. To meet this business need, in the prior art, a multi-task learning algorithm can be used to jointly model multiple stratification methods under the same stratification dimension, and a stratification prediction model that can output stratification results of multiple stratification methods can be trained.

[0004] However, in the process of implementing the present invention, it was found that there are at least the following problems in the prior art: the stratification results of various stratification methods output by the stratified prediction model may collide, and this collision will affect the overall performance of the stratified prediction model, thereby affecting the use effect of the stratified prediction model (for example, the stratification results of one stratification method correspond to the best-selling product level, and the stratification results of another stratification method correspond to the slow-moving product level. These two stratification results collide. If the items are accurately operated and promoted through these two stratification results, it will affect the operation effect and promotion effect), which is not conducive to the widespread application of the model. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, equipment and storage medium for updating a hierarchical prediction model, which can reduce the impact of collisions between hierarchical results on the overall performance of the hierarchical prediction model, thereby improving the use effect of the hierarchical prediction model and facilitating the widespread application of the model.

[0006] In the first aspect, an embodiment of the present invention provides a method for updating a hierarchical prediction model, wherein the hierarchical prediction model includes a hierarchical prediction sub-model and a collision prediction sub-model, the method comprising: inputting characteristic data of a target object into the hierarchical prediction model, obtaining predicted hierarchical data sequences for each hierarchical mode output by the hierarchical prediction sub-model, and obtaining predicted collision probability sequences between each predicted hierarchical data sequence output by the collision prediction sub-model; and updating the hierarchical prediction model based on each predicted hierarchical data sequence, each predicted collision probability sequence, and each actual hierarchical result corresponding to each predicted hierarchical data sequence.

[0007] In the second aspect, an embodiment of the present invention provides an application method of a hierarchical prediction model, which includes a hierarchical prediction sub-model in the hierarchical prediction model obtained according to the updating method of the hierarchical prediction model provided in the first aspect; the method includes: obtaining feature data of the item to be predicted; inputting the feature data of the item to be predicted into the hierarchical prediction model, and obtaining each prediction stratification result for each stratification method output by the hierarchical prediction sub-model.

[0008] In a third aspect, an embodiment of the present invention further provides a device for updating a hierarchical prediction model, wherein the hierarchical prediction model includes a hierarchical prediction sub-model and a collision prediction sub-model, and the device includes a model processing module and a model updating module;

[0009] Specifically, the model processing module is used to input the characteristic data of the target object into the hierarchical prediction model, obtain each predicted hierarchical data sequence for each hierarchical mode output by the hierarchical prediction sub-model, and obtain each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction sub-model;

[0010] The model updating module is used to update the hierarchical prediction model based on each predicted hierarchical data sequence, each predicted collision probability sequence, and each actual hierarchical result corresponding to each predicted hierarchical data sequence.

[0011] In a fourth aspect, an embodiment of the present invention further provides a device for updating a hierarchical prediction model, wherein the hierarchical prediction model includes a hierarchical prediction sub-model in the hierarchical prediction model obtained according to the method for updating the hierarchical prediction model provided in the first aspect, and the device includes an acquisition module and a model application module;

[0012] Specifically, an acquisition module is used to obtain feature data of an item to be predicted;

[0013] The model application module is used to input the characteristic data of the item to be predicted into the hierarchical prediction model to obtain the prediction results of each stratification method output by the hierarchical prediction sub-model.

[0014] In a fifth aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0015] one or more processors;

[0016] A memory for storing one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for updating the hierarchical prediction model or the method for applying the hierarchical prediction model as provided in any embodiment of the present invention.

[0018] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for updating a hierarchical prediction model or a method for applying a hierarchical prediction model as provided in any embodiment of the present invention.

[0019] The embodiments of the above invention have the following advantages or beneficial effects:

[0020] In the technical solution provided by the embodiment of the present invention, a collision prediction submodel is added on the basis of the model architecture of the hierarchical prediction model of the prior art (corresponding to the hierarchical prediction submodel in the embodiment of the present invention), and a hierarchical prediction model including a hierarchical prediction submodel and a collision prediction submodel is obtained. After the characteristic data of the target object is input into the hierarchical prediction model, each predicted hierarchical data sequence for each hierarchical method output by the hierarchical prediction submodel can be obtained, and each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction submodel can be obtained. Among them, each predicted hierarchical data sequence can represent each hierarchical result obtained by hierarchizing the target object using each hierarchical method, and each predicted collision probability sequence can represent the probability of collision between each predicted hierarchical data sequence, then, each predicted collision probability sequence can represent the collision probability of collision between each hierarchical result. Afterwards, in the process of updating the hierarchical prediction model based on each predicted hierarchical data sequence and each actual hierarchical result, the hierarchical prediction model can be updated in combination with each predicted collision probability sequence. It can be seen that in the embodiment of the present invention, by adding a collision prediction sub-model for characterizing the collision probability between each layered result in the hierarchical prediction model, the collision probability between each layered result becomes a parameter that can be characterized and measured in the hierarchical prediction model. Then, in the process of updating and iterating the hierarchical prediction model, referring to this parameter (i.e., each predicted collision probability sequence used to characterize the collision probability between each layered result), the hierarchical prediction model can be iterated in the direction of a smaller collision probability. In this way, the impact of the collision between the layered results on the overall performance of the hierarchical prediction model can be reduced, thereby improving the use effect of the hierarchical prediction model and being more conducive to the widespread application of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flowchart of a method for updating a hierarchical prediction model provided by an embodiment of the present invention;

[0022] Figure 2 It is a schematic diagram of a model architecture of a hierarchical prediction model provided by an embodiment of the present invention;

[0023] Figure 3 It is a simplified flowchart of a method for updating a hierarchical prediction model provided by an embodiment of the present invention;

[0024] Figure 4 It is a flowchart of another updating method of a hierarchical prediction model provided by an embodiment of the present invention;

[0025] Figure 5 It is a flowchart of an application method of a hierarchical prediction model provided by an embodiment of the present invention;

[0026] Figure 6 It is a structural schematic diagram of a device for updating a hierarchical prediction model provided by an embodiment of the present invention;

[0027] Figure 7 It is a structural schematic diagram of an application device of a hierarchical prediction model provided by an embodiment of the present invention;

[0028] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0030] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0031] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0032] It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0033] In the description of the embodiments of the present invention, unless otherwise specified, “plurality” or “each” means two or more than two.

[0034] Before further describing the present invention in detail, the application background of the technical solution provided in the embodiment of the present invention, the technical solution for stratifying items in the prior art, and the stratification prediction model in the prior art are briefly described.

[0035] At present, how to efficiently and accurately stratify items (such as commodities) has become the key to accurately operate and promote items in a big data network environment. For example, personalized recommendations, advertising displays, content recommendations, etc. are all applications based on item stratification. In different business scenarios, different stratification dimensions can be used to stratify items. For example, the stratification dimensions may include click-through rate (CTR), resource demand (such as sales volume), and delivery probability (such as best-selling). Moreover, for the same stratification dimension, different stratification methods may correspond to different business scenarios.

[0036] Taking the stratification of items according to resource demand as an example, generally, items can be stratified in three stratification methods. Specifically, stratification method 1 can be: rank the items in order of resource demand from small to large, rank the items with the ranking results in the first 33.3% percentile into the first level, rank the items with the ranking results between the 33.33% and 66.67% percentile into the second level, rank the items with the ranking results in the last 33.3% percentile (that is, between the 66.67% and 100% percentile) into the third level. Based on this stratification method, the items can be divided into three different levels.

[0037] The second stratification method can be: sort the items in order of resource demand from small to large, and divide the items with sorting results in the first 20% percentile into the first level, divide the items with sorting results between the 20% and 40% percentile into the second level, divide the items with sorting results between the 40% and 60% percentile into the third level, divide the items with sorting results between the 60% and 80% percentile into the fourth level, and divide the items with sorting results in the last 20% percentile (that is, between the 80% and 100% percentile) into the fifth level. Based on this stratification method, the items can be divided into five different levels.

[0038] The third stratification method can be: sorting the items in order of resource demand from small to large, and then dividing each 10% quantile into a level according to the sorting results, that is, dividing the items into ten different levels.

[0039] In the prior art, in some operation / promotion scenarios, there may be a need to stratify items using multiple stratification methods under the same stratification dimension. For example, during a certain period of time, operators can promote each item based on the stratification results obtained through the above-mentioned stratification method one, and during another period of time, they can promote each item based on the stratification results obtained through the above-mentioned stratification method two, thereby determining the stratification method applicable to the current stage based on the effects of the two promotions. Based on this business demand, in the prior art, different stratification methods can be independently modeled, and multiple stratification prediction models can be trained to output stratification results of multiple stratification methods respectively; or, a multi-task learning algorithm (for example, a multi-task machine learning algorithm) can be used to jointly model multiple stratification methods under the same stratification dimension, and each stratification method can be used as a subtask of model training to train a stratification prediction model that can output stratification results of multiple stratification methods.

[0040] However, whether it is independent modeling or joint modeling, there may be a problem of collision between the stratification results of multiple stratification methods. For example, for the same item, the stratification result obtained by stratifying the item using the above-mentioned stratification method 2 is that the resource demand of the item belongs to the level corresponding to the top 20% quantile; the stratification result obtained by stratifying the item using the above-mentioned stratification method 3 is that the resource demand of the item belongs to the level corresponding to the 30% to 40% quantile, and the top 20% quantile and the 30% to 40% quantile, these two quantile intervals have no intersection, so the same item cannot belong to the level corresponding to these two quantile intervals. At this time, it can be determined that the stratification results of the two stratification methods are contradictory (that is, there is a collision). If the items are accurately operated and promoted through these two contradictory stratification results, it will affect the operation effect and promotion effect. For example, if in the above-mentioned stratification method 2 and the above-mentioned stratification method 3, the items corresponding to the top 20% percentiles are determined as slow-moving products, and the items corresponding to the 30% to 100% percentiles are determined as best-selling products, then, if the slow-moving products are promoted according to the stratification results of the above-mentioned stratification method 2 on the first day, and the best-selling products are promoted according to the stratification results of the above-mentioned stratification method 3 on the second day, due to the collision between the stratification results of the two stratification methods, multiple items will be promoted repeatedly, affecting the promotion effect.

[0041] A solution is proposed in the prior art to solve the collision problem between the hierarchical results output by multiple hierarchical prediction models trained by independent modeling methods. Specifically, the business personnel can prioritize the multiple hierarchical prediction models trained in advance. When the hierarchical results output by a low-priority hierarchical prediction model collide with the hierarchical results output by a high-priority hierarchical prediction model, the hierarchical results output by the low-priority hierarchical prediction model can be considered to be erroneous results. Then, the hierarchical results output by the low-priority hierarchical prediction model can be corrected according to the hierarchical results output by the high-priority hierarchical prediction model. However, since each hierarchical prediction model is independently modeled, the goal of training each hierarchical prediction model is to have the highest accuracy of the hierarchical results output under the corresponding hierarchical method. If the hierarchical results output by one hierarchical prediction model are corrected according to the hierarchical results output by another hierarchical prediction model, the accuracy of the hierarchical results output by the other hierarchical prediction model will gradually decrease, thereby causing the comprehensive accuracy of multiple hierarchical prediction models to gradually decrease. Moreover, since business personnel are required to prioritize the multiple trained hierarchical prediction models in advance, the accuracy of the sorting depends on the business experience of the business personnel. When the business personnel lack business experience, the correct hierarchical results may be modified into incorrect hierarchical results, which not only expands the impact of the collision, but also causes the prediction accuracy of multiple hierarchical prediction models to decrease instead of increase.

[0042] To address the collision problem between multiple hierarchical results output by a hierarchical prediction model trained using a joint modeling approach, current solutions are all aimed at improving the output accuracy of each subtask. However, improving the output accuracy of each subtask has a very limited effect on alleviating the collision problem, and cannot fundamentally solve the impact of the collision problem on the overall performance of the model.

[0043] In summary, how to ensure the prediction accuracy of the hierarchical prediction model while reducing the possibility of collision between the results of each layer has become a technical problem that needs to be solved urgently.

[0044] In order to solve the problems existing in the above-mentioned prior art, an embodiment of the present invention proposes a method for updating a hierarchical prediction model, which is an improvement made on the hierarchical prediction model obtained by joint modeling. Figure 1 A flowchart of a method for updating a hierarchical prediction model provided in an embodiment of the present invention, which method can be applied to application scenarios in which items are hierarchized in multiple hierarchical ways under the same hierarchical dimension. The method can be executed by an apparatus for updating a hierarchical prediction model provided in an embodiment of the present invention, which can be implemented in software and / or hardware and integrated in an electronic device.

[0045] like Figure 1As shown, the updating method of the hierarchical prediction model provided by the embodiment of the present invention specifically includes the following steps:

[0046] S110. Input the characteristic data of the target object into the hierarchical prediction model to obtain each predicted hierarchical data sequence for each hierarchical mode output by the hierarchical prediction sub-model, and obtain each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction sub-model.

[0047] In an embodiment of the present invention, a collision prediction sub-model is added to the model architecture of the hierarchical prediction model of the prior art (corresponding to the hierarchical prediction sub-model in the embodiment of the present invention), thereby obtaining a hierarchical prediction model including a hierarchical prediction sub-model and a collision prediction sub-model. The hierarchical prediction model is a multi-task network model.

[0048] Among them, the input of the hierarchical prediction sub-model can be feature data, and the output can be each predicted hierarchical data sequence for each hierarchical method, and each predicted hierarchical data sequence can represent each hierarchical result obtained by hierarchizing the target item using each hierarchical method. Taking the three hierarchical methods for hierarchizing items according to resource demand as an example, each predicted hierarchical data sequence can include sequence A (x1; x2; x3), sequence B (y1; y2; y3; y4; y5), and sequence C (z1; z2; z3; z4; z5; z6; z7; z8; z9; z10), and each element in each sequence is used to represent the probability that the hierarchical result belongs to each level in the corresponding hierarchical method. For example, x1, x2, and x3 in sequence A are used to represent the probability that the hierarchical result obtained by hierarchizing the target item using hierarchical method one belongs to the three levels of hierarchical method one.

[0049] The input of the collision prediction sub-model can be the output of the layered prediction sub-model (that is, each predicted layered data sequence), and the output of the collision prediction sub-model can be each predicted collision probability sequence. Each predicted collision probability sequence can represent the probability of collision between each predicted layered data sequence. Since each predicted layered data sequence can represent each layered result obtained by layering the target object using each layered method, each predicted collision probability sequence can represent the collision probability of collision between each layered result.

[0050] Specifically, for each predicted collision probability sequence, the current predicted collision probability sequence is used to characterize the probability of a collision between a sequence element in the first current predicted hierarchical data sequence and a sequence element in the second current predicted hierarchical data sequence. The first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence are two predicted hierarchical data sequences corresponding to the current predicted collision probability sequence in each predicted hierarchical data sequence. Taking the predicted collision probability sequence between sequence A and sequence B as an example, the predicted collision probability sequence can be sequence D (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15), and each element in sequence D can be used to characterize the probability of a collision between each element in sequence A and each element in sequence B. For example, a1 in sequence D is used to characterize the probability of a collision between x1 in sequence A and y1 in sequence B.

[0051] Reference Figure 2 , is a schematic diagram of a model architecture of a hierarchical prediction model provided by an embodiment of the present invention. Figure 2 As shown, the hierarchical prediction sub-model can include multiple input layers (corresponding to Figure 2 The input layer of item attribute features, behavior features, promotional derivative features, and storage features in the ), multiple embedding layers (corresponding to Figure 2 The embedding layer in ), the embedding vector concatenation layer, multiple fully connected layers, and the personalized output layer for different layering methods (corresponding to Figure 2 The output layer of the first layer, the output layer of the second layer, and the output layer of the third layer). Figure 2 As shown, the collision prediction sub-model includes multiple combined layers (such as Figure 2 , for the combined layer a between the output layer of the layered method 1 and the output layer of the layered method 2, for the combined layer b between the output layer of the layered method 1 and the output layer of the layered method 3, for the combined layer c between the output layer of the layered method 2 and the output layer of the layered method 3), and multiple collision output layers (such as Figure 2 , the collision output layer of the layering method one and the layering method two, the collision output layer of the layering method one and the layering method three, and the collision output layer of the layering method two and the layering method three).

[0052] Understandably, Figure 2 The hierarchical prediction model shown is only an example. In practical applications, the hierarchical prediction sub-model in the hierarchical prediction model may also be other structures, which are not limited in the embodiments of the present invention. In the following description of the embodiments of the present invention, the hierarchical prediction sub-model in the hierarchical prediction model will be based on Figure 2 The hierarchical prediction model shown is used as an example to explain.

[0053] First, before updating (or training) the hierarchical prediction model, the feature data of each target item can be collected from each data source (corresponding to each business channel) according to the business scenario, and the actual stratification results of each target item for various stratification methods can be collected. Afterwards, the collected feature data of each target item and the actual stratification results of each target item can be used as seed samples, and these seed samples can be randomly divided according to a predetermined ratio (for example, it can be 8:2) as a training set and a test set, respectively, and then the hierarchical prediction model can be updated according to the training set and the test set. It should be noted that in actual applications, the processing process of each target item in the embodiment of the present invention is exactly the same, and the processing process of a target item will be used as an example to explain below.

[0054] In a possible implementation, feature data may include item attribute features, behavior features, promotion derivative features, and storage features. Taking the target item as a commodity for sale as an example, item attribute features may include the category level, brand, pricing, discount amount, etc. of the commodity, behavior features may include the sales volume, order volume, number of added purchases, number of added purchases, number of favorites, number of visits, etc. of the commodity within a certain time range (one year / half year / quarter / month / week), promotion derivative features may include the number of clicks and number of orders for commodities on the advertising page and recommendation page, and storage features may include the inventory status and average turnover time of the commodity within a certain time range.

[0055] Input the target item's attribute characteristics, behavior characteristics, promotion derivative characteristics, and storage characteristics Figure 2After the hierarchical prediction model shown in the figure, the item attribute features, behavior features, and storage features will be input into the corresponding embedding layer respectively. Each embedding layer can convert the corresponding input features into vectors respectively, and map the item attribute features, behavior features, and storage features into vectors of fixed length in their respective spaces and then input them into the embedding vector concatenation layer; the obtained behavior features are generally in vector form and can be directly input into the embedding vector concatenation layer; the embedding vector concatenation layer can concatenate the vectors corresponding to the item attribute features, behavior features, generalized derivative features, and storage features, and input the concatenated vectors into the fully connected layer. The fully connected layer is used to linearly combine the output data of the previous layer (each element can be expressed as a function of the linear combination of the elements of the previous layer). Among them, the number of layers and dimensions of the fully connected layer can be repeatedly adjusted and tried according to the amount of data, data characteristics, and the effect of the model on the training set (or test set). The output data of these fully connected layers will be shared with all tasks in the model as the input of the personalized output layer for different hierarchical methods, or as part of the input. The personalized output layer can map the output data of the fully connected layer to the corresponding output space, and output the predicted hierarchical data sequence of the corresponding hierarchical method. Taking the three hierarchical methods of hierarchizing items according to resource demand as an example, the personalized output layer can include the output layer of hierarchical method 1, the output layer of hierarchical method 2, and the output layer of hierarchical method 3. These three personalized output layers can output sequence A, sequence B, and sequence C respectively.

[0056] Each prediction layer data sequence output by each personalized output layer will be input into the corresponding combination layer (for example, sequence A and sequence B can be input into the corresponding combination layer a), and the combination layer a can combine the input data (for example, x1 in sequence A and y1 in sequence B), and input the combined data into each collision output layer. The number of combination layers is determined by the number of personalized output layers. If the number of personalized output layers is k, the number of combination layers is The collision output layer can process each pair of input combination data to obtain a predicted collision probability sequence. For example, the collision output layer of layered mode 1 and layered mode 2 can process the pair of combination data x1 and y1 to obtain the predicted collision probability data a1 between x1 and y1. Similarly, each element in sequence A and sequence B can be combined and processed in pairs, and then a predicted collision probability sequence for sequence A and sequence B can be obtained.

[0057] S120, updating the hierarchical prediction model based on each predicted hierarchical data sequence, each predicted collision probability sequence, and each actual hierarchical result corresponding to each predicted hierarchical data sequence.

[0058] Among them, each actual stratification result may be an actual stratification result obtained by stratifying the target object according to each stratification method.

[0059] In the prior art, in the process of updating the hierarchical prediction model, the gap between the model prediction value and the actual value is generally analyzed based on each predicted hierarchical data sequence and each actual hierarchical result, and the parameters of the model are adjusted according to the gap, so that the accuracy of the updated hierarchical prediction model is higher. On this basis, the embodiments of the present invention can adjust the parameters of the model in combination with each predicted collision probability sequence used to characterize the collision probability between each hierarchical result. In this way, the updated hierarchical prediction model can iterate in the direction of higher accuracy while also iterating in the direction of lower collision probability, thereby reducing the impact of collisions between hierarchical results on the overall performance of the hierarchical prediction model.

[0060] In one possible implementation, the characteristic data of the target item is determined based on a data source of a first historical time period, and each actual stratification result is determined based on a data source of a second historical time period. The time span of the first historical time period and the second historical time period is the same, and the first historical time period is before the second historical time period.

[0061] The first historical time period and the second historical time period may be predetermined time periods. Exemplarily, the first historical time period may be the last week, and the second historical time period may be the last week. For example, if the current time is June 18, 2023, the first historical time period may be June 4, 2023 to June 10, 2023, and the second historical time period may be June 11, 2023 to June 17, 2023. The stratified prediction model updated based on the data sources of these two historical time periods can be used to predict the stratified results after June 18, 2023. For example, it can be used to predict the stratified results from June 18, 2023 to June 24, 2023.

[0062] Since the hierarchical prediction model predicts future data based on historical data during application, in order to make the relationship between sample input (feature data) and sample output (actual hierarchical results) in the training set and test set of the model closer to the relationship between input data and predicted data in actual application, in the embodiment of the present invention, the sample input and sample output can be determined according to the data source of different historical time periods, and the historical time period corresponding to the sample input is before the historical time period corresponding to the sample output. In this way, the accuracy of the updated hierarchical prediction model can be further improved.

[0063] Reference Figure 3 , is a simplified flow chart of a method for updating a hierarchical prediction model provided by an embodiment of the present invention. Figure 3As shown, the characteristic data of each target item in the first historical time period can be obtained from the data source as a sample input, and the stratification results of each target item in the second historical time period for different stratification methods can be obtained from the data source (corresponding to Figure 3 Label1, Label2, Label3) in the training set are used as sample outputs. After that, the sample input and sample output can be used as seed samples and divided into training set and test set in proportion. Then, the model can be trained based on the training set, and the model can be verified and adjusted based on the test set. Specifically, the sample input in the test set can be predicted based on the trained model, and then the sample output can be compared with the prediction results to calculate the model accuracy and collision degree. Figure 2 Taking the stratified prediction model shown in the figure as an example, three stratification methods correspond to three accuracy rates, and every two stratification methods correspond to a collision degree, that is, three stratification methods correspond to three collision degrees. These three accuracy rates and three collision degrees can be used as evaluation indicators of the model to guide the estimation of model hyperparameters. Among them, the accuracy rate corresponding to a certain stratification method = the number of samples with correct stratification results predicted by this stratification method / the total number of samples in the test set, and the collision degree corresponding to two stratifications = the number of samples with collision results predicted by these two stratification methods / the total number of samples in the test set.

[0064] In the updating method of the hierarchical prediction model provided by the embodiment of the present invention, a collision prediction submodel is added on the basis of the model architecture of the hierarchical prediction model of the prior art (corresponding to the hierarchical prediction submodel in the embodiment of the present invention), and a hierarchical prediction model including a hierarchical prediction submodel and a collision prediction submodel is obtained. After the characteristic data of the target object is input into the hierarchical prediction model, each predicted hierarchical data sequence for each hierarchical method output by the hierarchical prediction submodel can be obtained, and each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction submodel can be obtained. Among them, each predicted hierarchical data sequence can represent each hierarchical result obtained by hierarchizing the target object using each hierarchical method, and each predicted collision probability sequence can represent the probability of collision between each predicted hierarchical data sequence, then, each predicted collision probability sequence can represent the collision probability of collision between each hierarchical result. Afterwards, in the process of updating the hierarchical prediction model based on each predicted hierarchical data sequence and each actual hierarchical result, the hierarchical prediction model can be updated in combination with each predicted collision probability sequence. It can be seen that in the embodiment of the present invention, by adding a collision prediction sub-model for characterizing the collision probability between each layered result in the hierarchical prediction model, the collision probability between each layered result becomes a characterizable and measurable parameter in the hierarchical prediction model. Then, in the process of updating and iterating the hierarchical prediction model, referring to this parameter (i.e., each predicted collision probability sequence used to characterize the collision probability between each layered result), the hierarchical prediction model can be iterated in the direction of a smaller collision probability. In this way, the impact of the collision between the layered results on the overall performance of the hierarchical prediction model can be reduced, thereby improving the use effect of the hierarchical prediction model and being more conducive to the wide application of the model. In summary, the embodiment of the present invention can reduce the possibility of collision between each layered result while ensuring the prediction accuracy of the hierarchical prediction model.

[0065] Reference Figure 4 , is a flow chart of another method for updating a hierarchical prediction model provided by an embodiment of the present invention. The method in this embodiment can be combined with various optional solutions in the method for updating a hierarchical prediction model provided by the previous embodiment, and the method for updating a hierarchical prediction model provided by the previous embodiment is further optimized. Figure 4 As shown, the specific steps include:

[0066] S410. Input the characteristic data of the target object into the hierarchical prediction model to obtain each predicted hierarchical data sequence for each hierarchical mode output by the hierarchical prediction sub-model, and obtain each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction sub-model.

[0067] S420, determining a hierarchical loss function of the hierarchical prediction model based on each predicted hierarchical data sequence, each actual hierarchical result, and a predetermined hierarchical loss expression.

[0068] Among them, the hierarchical loss expression can be an expression corresponding to the cross entropy loss function, which can be a function expression related to the sequence elements in the predicted hierarchical data sequence and the actual hierarchical results. Substituting the sequence elements in each predicted hierarchical data sequence and the numerical values ​​corresponding to each actual hierarchical result into the expression, the hierarchical loss function of the hierarchical prediction model can be obtained. Specifically, the expression corresponding to the cross entropy loss function can refer to the relevant description in the prior art, and the embodiments of the present invention will not be repeated here.

[0069] It is understandable that, in practical applications, the layered loss expression may also be an expression corresponding to other types of loss functions, which will not be described in detail in the embodiments of the present invention.

[0070] S430: Determine a comprehensive collision penalty parameter of the hierarchical prediction model based on each predicted collision probability sequence.

[0071] Among them, the comprehensive collision penalty parameter is used to characterize the comprehensive probability of collision between each predicted collision probability sequence. The larger the comprehensive collision penalty parameter, the greater the possibility of collision between each predicted collision probability sequence. On the contrary, the smaller the comprehensive collision penalty parameter, the smaller the possibility of collision between each predicted collision probability sequence.

[0072] Optionally, determining the comprehensive collision penalty parameters of the hierarchical prediction model based on each predicted collision probability sequence may include: for each predicted collision probability sequence, determining the collision penalty parameters corresponding to the current predicted collision probability sequence based on the current predicted collision probability sequence and the current collision penalty intensity sequence between the first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence output by the collision prediction sub-model; and determining the comprehensive collision penalty parameters according to the collision penalty parameters corresponding to each predicted collision probability sequence.

[0073] The current collision penalty strength sequence can be used to characterize the numerical values ​​of the sequence elements in the first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence, and the numerical values ​​can be used to characterize the penalty strength for the collision between the first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence. Specifically, the current collision penalty strength sequence can be obtained by performing some operation (e.g., addition, multiplication, etc.) on the sequence elements in the first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence.

[0074] Exemplarily, the first current predicted hierarchical data sequence is sequence A, and the second current predicted hierarchical data sequence is sequence B. Then the current collision penalty strength sequence can be determined based on the sequence elements in sequence A and sequence B, and is a sequence used to characterize the numerical sizes of the sequence elements in sequence A and sequence B.

[0075] The collision penalty parameter corresponding to the current predicted collision probability sequence is used to characterize the penalty value for the collision between the first current predicted layered data sequence and the second current predicted layered data sequence; the comprehensive collision penalty parameter is used to characterize the penalty value for the collision between each predicted layered data sequence.

[0076] Optionally, an embodiment of the present invention may determine the collision penalty parameters corresponding to the current predicted collision probability sequence in the following manner: for each predicted collision probability data in the current predicted collision probability sequence, based on the current predicted collision probability data and the current collision penalty intensity data, determine the collision penalty data corresponding to the current predicted collision probability data; based on the collision penalty data corresponding to each predicted collision probability data, determine the collision penalty parameters corresponding to the current predicted collision probability sequence.

[0077] The current collision penalty intensity data is the collision penalty intensity data corresponding to the current predicted collision probability data among the collision penalty intensity data in the current collision penalty intensity sequence.

[0078] In an embodiment of the present invention, the number of elements in the current collision penalty strength sequence is the same as the number of elements in the current predicted collision probability sequence. For example, if the current predicted collision probability sequence is sequence D (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15), the current collision penalty strength sequence can be sequence E (b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15). Where a1 is used to characterize the probability of collision between x1 in sequence A and y1 in sequence B, and b1 is used to characterize the numerical values ​​of x1 in sequence A and y1 in sequence B.

[0079] In one possible implementation, the collision penalty data corresponding to the current predicted collision probability data may be the product of the current predicted collision probability data and the current collision penalty intensity data. The collision penalty parameter corresponding to the current predicted collision probability sequence may be the sum of the collision penalty data corresponding to each predicted collision probability data. For example, if a1 is the current predicted collision probability data and b1 is the current collision penalty intensity data, the collision penalty data corresponding to the current predicted collision probability data may be a1*b1.

[0080] Optionally, the collision prediction sub-model can determine the current collision penalty intensity sequence in the following manner: based on a preset combination rule, each first current prediction layered data in the first current prediction layered data sequence and each second current prediction layered data in the second current prediction layered data sequence are combined to obtain the current combined sequence; for each sequence element, based on a first preset operation rule, the first current prediction layered data and the second current prediction layered data in the current sequence element are operated to obtain the collision penalty intensity data corresponding to the current sequence element; based on the collision penalty intensity data corresponding to each sequence element, the current collision penalty intensity sequence is determined.

[0081] Wherein, each sequence element in the current combination sequence includes a first current prediction hierarchical data and a second current prediction hierarchical data. The preset combination rule may be a predetermined sorting rule, based on which each first current prediction hierarchical data in the first current prediction hierarchical data sequence and each second current prediction hierarchical data in the second current prediction hierarchical data sequence may be combined in pairs. The first preset operation rule may be a predetermined operation rule, for example, the first current prediction hierarchical data and the second current prediction hierarchical data may be multiplied and then the square value may be taken.

[0082] Optionally, the collision prediction sub-model determines the current predicted collision probability sequence in each predicted collision probability sequence in the following manner: based on a preset combination rule, each first current predicted layered data in the first current predicted layered data sequence and each second current predicted layered data in the second current predicted layered data sequence are combined to obtain a current combined sequence; for each sequence element, the first current predicted layered data and the second current predicted layered data in the current sequence element are calculated based on a second preset calculation rule to obtain the predicted collision probability data corresponding to the current sequence element; based on the predicted collision probability data corresponding to each sequence element, the current predicted collision probability sequence is determined.

[0083] Among them, the second preset operation rule can be a predetermined operation rule. In a possible implementation, the embodiment of the present invention can predetermine a collision threshold for the collision between all stratification results of each two stratification methods. When the difference between the two predicted stratification data corresponding to the two stratification results of the two stratification methods is greater than the collision threshold, it can be determined that the two predicted stratification data have collided; conversely, when the difference is less than or equal to the collision threshold, it can be determined that the two predicted stratification data have not collided. In addition, during the model update iteration process, the collision threshold can be continuously adjusted according to the test results to make the model effect better.

[0084] Exemplarily, taking the first current predicted hierarchical data and the second current predicted hierarchical data in the current sequence element as an example, the first current predicted hierarchical data may be the output for the first level in hierarchical mode 1, used to characterize the probability that the target item belongs to the first level in hierarchical mode 1; the second current predicted hierarchical data may be the output for the first level in hierarchical mode 2, used to characterize the probability that the target item belongs to the first level in hierarchical mode 2. For the collision between the first level in hierarchical mode 1 and the first level in hierarchical mode 2, a collision threshold r is predetermined, then, when the difference between the first current predicted hierarchical data and the second current predicted hierarchical data is greater than r, it can be determined that the first current predicted hierarchical data and the second current predicted hierarchical data have collided, and the predicted collision probability data corresponding to the current sequence element is 1; when the difference between the first current predicted hierarchical data and the second current predicted hierarchical data is less than or equal to r, it can be determined that the first current predicted hierarchical data and the second current predicted hierarchical data have not collided, and the predicted collision probability data corresponding to the current sequence element is 0. In this way, when two elements collide, the corresponding penalty term is greater than 0, and when there is no collision, the corresponding penalty term is 0. Then, when a collision occurs, the value of the comprehensive collision penalty parameter will be larger, and the model will iterate in the direction of reducing the comprehensive collision penalty parameter during the process of iterating in the direction of smaller collisions.

[0085] S440: Determine the comprehensive loss function of the hierarchical prediction model according to the hierarchical loss function and the comprehensive collision penalty parameter.

[0086] For example, if Loss represents the comprehensive loss function, loss0 represents the hierarchical loss function, and loss1 represents the comprehensive collision penalty parameter, then in a possible implementation, Loss = loss0 + loss1, where loss0 is a function of unknown quantities of the model parameters of the hierarchical prediction model, and loss1 is a constant term.

[0087] Optionally, determining the comprehensive loss function of the hierarchical prediction model according to the hierarchical loss function and the comprehensive collision penalty parameter may include: determining a weighted collision penalty parameter based on a predetermined collision penalty weight and a comprehensive collision penalty parameter; determining a comprehensive loss function based on the hierarchical loss function and the weighted collision penalty parameter.

[0088] The collision penalty weight may be a weight value determined in advance according to business requirements. By adjusting the weight value, it is possible to adjust whether the model iteration process is more inclined to improve accuracy or reduce collisions.

[0089] Taking the three stratification methods of stratifying items according to resource demand as an example, if the number of samples in this iteration process (that is, the number of target items) is n, the comprehensive loss function Loss can be determined by the following expression:

[0090]

[0091] Among them, loss0 represents the hierarchical loss function, loss2 represents the weighted collision penalty parameter, λ represents the collision penalty weight, and loss1 represents the comprehensive collision penalty parameter. i is the sample number, z k,i represents the output value of the kth dimension of the ith sample in stratification method 1 (the output dimension corresponds to the three levels of stratification method 1), y j,i represents the output value of the jth dimension of the ith sample in stratification method 2 (the output dimension corresponds to the five levels of stratification method 2), w l,i Represents the output value of the i-th sample in the l-th dimension in the stratification method 2 (this output dimension corresponds to the ten levels of the stratification method 3). Represents y j,i With z k,i Whether a collision occurs, if so, If no collision occurs, akin, Represents y j,i With w l,i Whether a collision occurred, Indicates z k,i With w l,i Whether a collision occurred.

[0092] Taking the case where the first current predicted hierarchical data sequence is the output sequence of hierarchical mode 1 and the second current predicted hierarchical data sequence is the output sequence of hierarchical mode 2 as an example, the current collision penalty intensity sequence of the i-th sample is The current predicted collision probability sequence of the i-th sample is Then the collision penalty parameter corresponding to the current predicted collision probability sequence of the i-th sample is

[0093] It can be seen that in the embodiment of the present invention, it is also possible to support users to flexibly configure the proportion of collision penalty items according to the actual needs of business scenarios. For example, when the hierarchical prediction model focuses on solving the hierarchical collision problem to a greater extent, a larger weight can be set for the collision penalty item. When the hierarchical prediction model focuses on improving the model accuracy, a smaller weight can be set for the collision penalty item. By flexibly configuring the proportion of collision penalty items, the needs of different business scenarios can be met, which is more conducive to the wide application of the model.

[0094] S450, updating the hierarchical prediction model based on the comprehensive loss function.

[0095] After determining the comprehensive loss function, the method of minimizing Loss can be used to solve the unknown quantity of the comprehensive loss function to obtain the model parameters. Exemplarily, the gradient descent method can be used to solve the unknown quantity of the comprehensive loss function. The specific process of using the gradient descent method to solve the unknown quantity of the comprehensive loss function can refer to the relevant description in the prior art, and the embodiments of the present invention will not be repeated here.

[0096] In an embodiment of the present invention, based on the aforementioned embodiment, a new loss function (i.e., a comprehensive loss function in the embodiment of the present invention) is proposed. The comprehensive loss function not only includes loss function terms related to the output accuracy of each stratification method (i.e., the stratification loss function in the embodiment of the present invention), but also adds a penalty term for collisions between stratification results (i.e., a comprehensive collision penalty parameter). When the possibility of collision is greater, the value of the penalty term is greater, and when the possibility of collision is smaller, the value of the penalty term is smaller. Updating the stratified prediction model based on the new loss function can promote the stratified prediction model to iterate more accurately in the direction of low collision possibility. It can be seen that the embodiment of the present invention can solve the collision problem between stratification results from two perspectives: adjusting the model structure and adjusting the model iteration process. It can reduce the probability of collision between stratification results while taking into account the output accuracy of each stratification method.

[0097] It should be noted that the updating method of the hierarchical prediction model proposed in the embodiment of the present invention and the aforementioned embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the aforementioned embodiment, and the beneficial effects of the aforementioned embodiment are also applicable to this embodiment.

[0098] Reference Figure 5 The embodiment of the present invention also provides a flowchart of a method for applying a hierarchical prediction model. The method for applying a hierarchical prediction model in this embodiment can be applied to the hierarchical prediction sub-model in the updated hierarchical prediction model obtained by the method for updating the hierarchical prediction model provided in the above embodiment. Exemplarily, the method in this embodiment can be applied to Figure 2 The hierarchical prediction submodel in the hierarchical prediction model shown in FIG. Figure 5 As shown, the specific steps include:

[0099] S510: Acquire feature data of the item to be predicted.

[0100] S520, input the characteristic data of the item to be predicted into the hierarchical prediction model, and obtain the prediction results of each stratification method output by the hierarchical prediction sub-model.

[0101] Exemplarily, for the item to be predicted, the hierarchical prediction submodel can determine each predicted hierarchical data sequence for each hierarchical method, and then each predicted hierarchical result can be determined based on each predicted hierarchical data sequence. For example, if the predicted hierarchical data sequence for hierarchical method 1 is (y1, y2, y3), and the value of y2 is the largest, then the level corresponding to y2 can be determined as the predicted hierarchical result for hierarchical method 1. Similarly, each predicted hierarchical result for each hierarchical method can be determined.

[0102] It should be noted that the application method of the hierarchical prediction model provided in the embodiment of the present invention and the updating method of the hierarchical prediction model proposed in the aforementioned embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to the aforementioned embodiment, and the beneficial effects of the aforementioned embodiment are also applicable in this embodiment.

[0103] Figure 6 The schematic diagram of the structure of the updating device of the hierarchical prediction model provided by the embodiment of the present invention, the hierarchical prediction model includes a hierarchical prediction sub-model and a collision prediction sub-model, and the device includes: a model processing module 610 and a model updating module 620.

[0104] Exemplarily, the model processing module 610 may execute S110 in the above method embodiment, and the model updating module 620 may execute S120 in the above method embodiment.

[0105] Specifically, the model processing module 610 is used to input the characteristic data of the target object into the hierarchical prediction model, obtain each predicted hierarchical data sequence for each hierarchical mode output by the hierarchical prediction sub-model, and obtain each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction sub-model;

[0106] The model updating module 620 is used to update the hierarchical prediction model based on each predicted hierarchical data sequence, each predicted collision probability sequence, and each actual hierarchical result corresponding to each predicted hierarchical data sequence.

[0107] Optionally, in a possible implementation manner, the model updating module 620 is specifically configured to:

[0108] Based on each predicted stratified data sequence, each actual stratified result, and a predetermined stratified loss expression, a stratified loss function of the stratified prediction model is determined; based on each predicted collision probability sequence, a comprehensive collision penalty parameter of the stratified prediction model is determined; based on the stratified loss function and the comprehensive collision penalty parameter, a comprehensive loss function of the stratified prediction model is determined; and the stratified prediction model is updated based on the comprehensive loss function.

[0109] Optionally, in another possible implementation, the model updating module 620 is further configured to:

[0110] For each predicted collision probability sequence, the collision penalty parameter corresponding to the current predicted collision probability sequence is determined based on the current predicted collision probability sequence and the current collision penalty intensity sequence between the first current predicted layered data sequence and the second current predicted layered data sequence output by the collision prediction sub-model; wherein the first current predicted layered data sequence and the second current predicted layered data sequence are the two predicted layered data sequences in each predicted layered data sequence that correspond to the current predicted collision probability sequence; and a comprehensive collision penalty parameter is determined based on the collision penalty parameters corresponding to each predicted collision probability sequence.

[0111] Optionally, in another possible implementation, the model updating module 620 is further configured to:

[0112] For each predicted collision probability data in the current predicted collision probability sequence, the collision penalty data corresponding to the current predicted collision probability data is determined based on the current predicted collision probability data and the current collision penalty intensity data; wherein the current collision penalty intensity data is the collision penalty intensity data corresponding to the current predicted collision probability data among each collision penalty intensity data in the current collision penalty intensity sequence; based on the collision penalty data corresponding to each predicted collision probability data, the collision penalty parameter corresponding to the current predicted collision probability sequence is determined.

[0113] Optionally, in another possible implementation, the collision prediction sub-model determines the current collision penalty intensity sequence in the following manner:

[0114] Based on a preset combination rule, each first current prediction layered data in a first current prediction layered data sequence and each second current prediction layered data in a second current prediction layered data sequence are combined to obtain a current combined sequence; wherein each sequence element in the current combined sequence includes a first current prediction layered data and a second current prediction layered data respectively; for each sequence element, the first current prediction layered data and the second current prediction layered data in the current sequence element are calculated based on a first preset calculation rule to obtain collision penalty intensity data corresponding to the current sequence element; based on the collision penalty intensity data corresponding to each sequence element, the current collision penalty intensity sequence is determined.

[0115] Optionally, in another possible implementation, the model updating module 620 is further configured to:

[0116] Based on the predetermined collision penalty weight and the comprehensive collision penalty parameter, a weighted collision penalty parameter is determined; based on the layered loss function and the weighted collision penalty parameter, a comprehensive loss function is determined.

[0117] Optionally, in another possible implementation, the collision prediction sub-model determines the current predicted collision probability sequence in each predicted collision probability sequence in the following manner:

[0118] Based on the preset combination rule, each first current prediction layered data in the first current prediction layered data sequence and each second current prediction layered data in the second current prediction layered data sequence are combined to obtain a current combined sequence; wherein the first current prediction layered data sequence and the second current prediction layered data sequence are two prediction layered data sequences in each prediction layered data sequence corresponding to the current prediction collision probability sequence; each sequence element in the current combined sequence includes a first current prediction layered data and a second current prediction layered data; for each sequence element, the first current prediction layered data and the second current prediction layered data in the current sequence element are calculated based on the second preset calculation rule to obtain the prediction collision probability data corresponding to the current sequence element; based on the prediction collision probability data corresponding to each sequence element, the current prediction collision probability sequence is determined.

[0119] Optionally, in another possible implementation, the characteristic data of the target item is determined based on a data source of a first historical time period, and each actual stratification result is determined based on a data source of a second historical time period, the first historical time period and the second historical time period have the same time span, and the first historical time period is before the second historical time period.

[0120] The updating device for the hierarchical prediction model provided in the embodiment of the present invention belongs to the same inventive concept as the updating method for the hierarchical prediction model provided in the aforementioned embodiments. For details not fully described in the embodiment of the updating device for the hierarchical prediction model, reference can be made to the relevant contents of the aforementioned updating method embodiments, and the corresponding beneficial effects can also be referred to the beneficial effect analysis of the aforementioned updating method embodiments.

[0121] Figure 7 A structural schematic diagram of an application device of a hierarchical prediction model provided in an embodiment of the present invention, wherein the hierarchical prediction model includes a hierarchical prediction sub-model in an updated hierarchical prediction model obtained according to the updating method of the hierarchical prediction model provided in the aforementioned embodiment, and the device includes: an acquisition module 710 and a model application module 720.

[0122] Exemplarily, the acquisition module 710 may execute S510 in the above method embodiment, and the model application module 720 may execute S520 in the above method embodiment.

[0123] Specifically, the acquisition module 710 is used to acquire feature data of the item to be predicted;

[0124] The model application module 720 is used to input the characteristic data of the item to be predicted into the hierarchical prediction model to obtain the prediction results of each stratification method output by the hierarchical prediction sub-model.

[0125] The application device of the hierarchical prediction model provided in the embodiment of the present invention belongs to the same inventive concept as the application method of the hierarchical prediction model provided in the aforementioned embodiment. For details not fully described in the embodiment of the application device of the hierarchical prediction model, reference can be made to the relevant contents of the aforementioned application method embodiment, and the corresponding beneficial effects can also be referred to the beneficial effect analysis of the aforementioned application method embodiment.

[0126] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 8 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0127] like Figure 8 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0128] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0129] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0130] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory (i.e., Figure 8 The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0131] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0132] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and / or any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 20. Figure 8 As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0133] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, such as implementing the updating method steps of the hierarchical prediction model provided in the embodiment of the present invention, the method comprising: inputting the characteristic data of the target item into the hierarchical prediction model, obtaining each predicted hierarchical data sequence for each hierarchical mode output by the hierarchical prediction sub-model, and obtaining each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction sub-model; updating the hierarchical prediction model based on each predicted hierarchical data sequence, each predicted collision probability sequence, and each actual hierarchical result corresponding to each predicted hierarchical data sequence. Alternatively, implementing the application method steps of the hierarchical prediction model provided in the embodiment of the present invention, the method comprising: obtaining the characteristic data of the item to be predicted; inputting the characteristic data of the item to be predicted into the hierarchical prediction model, obtaining each predicted hierarchical result for each hierarchical mode output by the hierarchical prediction sub-model, and obtaining each predicted collision result between each predicted hierarchical result output by the collision prediction sub-model.

[0134] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the method for updating the hierarchical prediction model provided by any embodiment of the present invention or the method for applying the hierarchical prediction model provided by any embodiment of the present invention.

[0135] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the updating method steps of the hierarchical prediction model provided in the aforementioned embodiment of the present invention or the application method steps of the hierarchical prediction model provided in the aforementioned embodiment of the present invention are implemented.

[0136] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0137] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0138] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0139] Computer program code for performing the operation of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or electronic device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0140] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0141] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for updating a hierarchical prediction model, characterized in that: The hierarchical prediction model includes a hierarchical prediction sub-model and a collision prediction sub-model, and the method includes: Input the characteristic data of the target object into the hierarchical prediction model, obtain each predicted hierarchical data sequence for each hierarchical mode output by the hierarchical prediction sub-model, and obtain each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction sub-model; The layered prediction model is updated based on the predicted layered data sequences, the predicted collision probability sequences, and the actual layered results corresponding to the predicted layered data sequences.

2. The updating method of the hierarchical prediction model according to claim 1, characterized in that: The updating of the hierarchical prediction model based on the predicted hierarchical data sequences, the predicted collision probability sequences, and the actual hierarchical results respectively corresponding to the predicted hierarchical data sequences comprises: Determine a hierarchical loss function of the hierarchical prediction model based on the predicted hierarchical data sequences, the actual hierarchical results, and a predetermined hierarchical loss expression; Determining a comprehensive collision penalty parameter of the hierarchical prediction model based on the predicted collision probability sequences; Determining a comprehensive loss function of the hierarchical prediction model according to the hierarchical loss function and the comprehensive collision penalty parameter; The hierarchical prediction model is updated based on the comprehensive loss function.

3. The updating method of the hierarchical prediction model according to claim 2, characterized in that: The step of determining the comprehensive collision penalty parameter of the hierarchical prediction model based on the predicted collision probability sequences includes: For each predicted collision probability sequence, based on the current predicted collision probability sequence and the current collision penalty intensity sequence between the first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence output by the collision prediction sub-model, a collision penalty parameter corresponding to the current predicted collision probability sequence is determined; wherein the first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence are two predicted hierarchical data sequences corresponding to the current predicted collision probability sequence in each predicted hierarchical data sequence; The comprehensive collision penalty parameter is determined according to the collision penalty parameters respectively corresponding to the predicted collision probability sequences.

4. The updating method of the hierarchical prediction model according to claim 3, characterized in that: The determining of the collision penalty parameter corresponding to the current predicted collision probability sequence based on the current predicted collision probability sequence and the current collision penalty intensity sequence between the first current predicted hierarchical data sequence and the second current predicted hierarchical data sequence output by the collision prediction sub-model comprises: For each predicted collision probability data in the current predicted collision probability sequence, based on the current predicted collision probability data and the current collision penalty intensity data, determining the collision penalty data corresponding to the current predicted collision probability data; wherein the current collision penalty intensity data is the collision penalty intensity data corresponding to the current predicted collision probability data among each collision penalty intensity data in the current collision penalty intensity sequence; Based on the collision penalty data respectively corresponding to the predicted collision probability data, a collision penalty parameter corresponding to the current predicted collision probability sequence is determined.

5. The updating method of the hierarchical prediction model according to claim 3, characterized in that: The collision prediction sub-model determines the current collision penalty intensity sequence in the following manner: Based on a preset combination rule, each first current prediction hierarchical data in the first current prediction hierarchical data sequence and each second current prediction hierarchical data in the second current prediction hierarchical data sequence are combined to obtain a current combined sequence; wherein each sequence element in the current combined sequence includes a first current prediction hierarchical data and a second current prediction hierarchical data; For each of the sequence elements, a calculation is performed on the first current prediction layer data and the second current prediction layer data in the current sequence element based on a first preset calculation rule to obtain collision penalty intensity data corresponding to the current sequence element; Based on the collision penalty strength data respectively corresponding to the sequence elements, a current collision penalty strength sequence is determined.

6. The updating method of the hierarchical prediction model according to claim 2, characterized in that: Determining the comprehensive loss function of the hierarchical prediction model according to the hierarchical loss function and the comprehensive collision penalty parameter includes: Determining a weighted collision penalty parameter based on a predetermined collision penalty weight and the comprehensive collision penalty parameter; The comprehensive loss function is determined based on the layered loss function and the weighted collision penalty parameter.

7. The updating method of the hierarchical prediction model according to claim 1, characterized in that: The collision prediction sub-model determines the current predicted collision probability sequence in the predicted collision probability sequences in the following manner: Based on a preset combination rule, each first current prediction hierarchical data in the first current prediction hierarchical data sequence and each second current prediction hierarchical data in the second current prediction hierarchical data sequence are combined to obtain a current combined sequence; wherein the first current prediction hierarchical data sequence and the second current prediction hierarchical data sequence are two prediction hierarchical data sequences corresponding to the current prediction collision probability sequence in each prediction hierarchical data sequence; each sequence element in the current combined sequence includes a first current prediction hierarchical data and a second current prediction hierarchical data; For each of the sequence elements, a calculation is performed on the first current prediction layer data and the second current prediction layer data in the current sequence element based on a second preset calculation rule to obtain predicted collision probability data corresponding to the current sequence element; Based on the predicted collision probability data respectively corresponding to each sequence element, a current predicted collision probability sequence is determined.

8. The method for updating the hierarchical prediction model according to any one of claims 1 to 7, characterized in that: The characteristic data of the target item is determined based on a data source of a first historical time period, and the actual stratification results are determined based on a data source of a second historical time period. The first historical time period and the second historical time period have the same time span, and the first historical time period is before the second historical time period.

9. A method for applying a hierarchical prediction model, characterized in that: The hierarchical prediction model includes a hierarchical prediction sub-model in the hierarchical prediction model obtained according to the method for updating the hierarchical prediction model according to any one of claims 1 to 8, wherein the method includes: Obtain feature data of the item to be predicted; The characteristic data of the item to be predicted is input into the hierarchical prediction model to obtain the prediction hierarchical results for each hierarchical method output by the hierarchical prediction sub-model.

10. A device for updating a hierarchical prediction model, characterized in that: The hierarchical prediction model includes a hierarchical prediction sub-model and a collision prediction sub-model, and the device includes: A model processing module, used for inputting the characteristic data of the target object into the hierarchical prediction model, obtaining each predicted hierarchical data sequence for each hierarchical mode output by the hierarchical prediction sub-model, and obtaining each predicted collision probability sequence between each predicted hierarchical data sequence output by the collision prediction sub-model; The model updating module is used to update the hierarchical prediction model based on the predicted hierarchical data sequences, the predicted collision probability sequences, and the actual hierarchical results corresponding to the predicted hierarchical data sequences.

11. An application device of a hierarchical prediction model, characterized in that: The hierarchical prediction model includes a hierarchical prediction sub-model in the hierarchical prediction model obtained according to the method for updating the hierarchical prediction model according to any one of claims 1 to 8, and the device includes: An acquisition module, used to acquire characteristic data of the item to be predicted; The model application module is used to input the characteristic data of the item to be predicted into the hierarchical prediction model to obtain the prediction results of each stratification method output by the hierarchical prediction sub-model.

12. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the updating method of the hierarchical prediction model as described in any one of claims 1 to 8, or implement the application method of the hierarchical prediction model as described in claim 9.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the updating method of the hierarchical prediction model as described in any one of claims 1 to 8, or implements the application method of the hierarchical prediction model as described in claim 9.