Task execution time sequence prediction model training method and device
By performing time series decomposition and prediction model training on the organization's historical task execution information, the problem of uneven task execution is solved, and high-precision task prediction and balanced planning are achieved.
Patent Information
- Application Number
- CN202411673780.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-11-15
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-21
AI Technical Summary
The existing technology is difficult to achieve balanced planning for organizational task execution, resulting in poor quality and efficiency of task completion.
By collecting historical task execution information of the target organization, a sample time series is constructed and sequenced decomposed to extract seasonal terms and trend terms. These items are input into the initial prediction model, output prediction information, and train the model by building a mixed loss function to obtain the target prediction model to achieve high-precision prediction of task execution information.
It realizes high-precision prediction of task execution information of target institutions, obtains balanced task execution planning, and improves task completion quality and efficiency.
Smart Images

Figure CN119598108A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a task execution timing prediction model training method. The present application also relates to a task execution timing prediction model training device, a computing device, and a computer-readable storage medium. Background Art
[0002] With the continuous development of various businesses in existing institutions, especially the growing number of tasks to be executed in the public sector, the distribution of tasks within the same cycle is crucial for task handlers. For example, in a task execution cycle of one year, some quarters have a high concentration of tasks, while other quarters have a low concentration of tasks, which will lead to a decline in the quality of task completion in the former and a low efficiency in task completion in the latter. Therefore, a method is urgently needed to achieve balanced task execution planning. Summary of the invention
[0003] In view of this, the embodiment of the present application provides a task execution timing prediction model training method to solve the technical defects existing in the prior art. The embodiment of the present application also provides a task execution timing prediction model training device, a computing device, and a computer-readable storage medium.
[0004] According to a first aspect of an embodiment of the present application, a task execution timing prediction model training method is provided, comprising:
[0005] Collecting historical task execution information of the target organization, and constructing a sample time series based on the historical task execution information;
[0006] Performing sequence decomposition on the sample time series to obtain seasonal items and trend items associated with the sample time series;
[0007] Input the season item into the initial forecast model to output first forecast information, input the trend item into the initial forecast model to output second forecast information, input the sample time series into the initial forecast model to obtain third forecast information;
[0008] Constructing seasonal loss, trend loss and overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series;
[0009] A mixed loss function is constructed according to the seasonal loss, the trend loss and the overall loss, and the initial prediction model is trained by the mixed loss function to obtain a target prediction model.
[0010] Optionally, the initial prediction model includes an attention mechanism layer, wherein the influence factor associated with the attention mechanism layer is the task type of the task data included in the historical task execution information.
[0011] Optionally, the step of inputting the seasonal item into an initial prediction model and outputting first prediction information comprises:
[0012] Extracting features of the seasonal item through the convolution layer of the initial prediction model to obtain target seasonal features;
[0013] Performing dimensionality reduction on the target seasonal feature through the pooling layer of the initial prediction model to obtain a dimensionality-reduced seasonal feature;
[0014] The reduced-dimensional seasonal features are processed by the attention mechanism layer, and the processing results are input into the fully connected layer of the initial prediction model for processing to obtain the first prediction information, wherein, during the data processing of the initial prediction model, the discard layer of the initial prediction model randomly discards the neurons of the initial prediction model.
[0015] Optionally, constructing a sample time series according to the historical task execution information includes:
[0016] Querying missing values in the historical task execution information, and supplementing the missing values by a preset interpolation algorithm;
[0017] Under the assumption of normal distribution, based on the degree of variation of the statistical data, it is determined in turn whether the task data contained in the historical task execution information is an abnormal value.
[0018] If yes, remove the outlier and supplement the outlier according to the interpolation algorithm;
[0019] If not, the task data is retained until all the task data are processed, sample task execution information is obtained, and the sample time series is constructed according to the sample task execution information.
[0020] Optionally, constructing seasonal loss, trend loss and overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series includes:
[0021] constructing the seasonal loss according to the first prediction information and the sample time series;
[0022] constructing the trend loss according to the second prediction information and the sample time series;
[0023] The overall loss is constructed according to the third prediction information and the sample time series.
[0024] Optionally, constructing a mixed loss function according to the seasonal loss, the trend loss and the overall loss includes:
[0025] Based on a preset first weight coefficient, weighted summing the seasonal loss and the trend loss is performed to obtain a component loss function;
[0026] Based on a preset second weight coefficient, the component loss function and the overall loss are weightedly summed to obtain a mixed loss function.
[0027] Optionally, the training the initial prediction model by using the hybrid loss function to obtain a target prediction model includes:
[0028] According to a preset min-max method, the first weight coefficient and the second weight coefficient are optimized to obtain a target hybrid loss function;
[0029] The initial prediction model is trained according to the target mixed loss function to obtain the target prediction model.
[0030] According to a second aspect of an embodiment of the present application, a task execution timing prediction model training device is provided, comprising:
[0031] A collection module configured to collect historical task execution information of a target organization and construct a sample time series based on the historical task execution information;
[0032] A decomposition module is configured to perform sequence decomposition on the sample time series to obtain a seasonal term and a trend term associated with the sample time series;
[0033] A processing module is configured to input the season item into an initial prediction model to output first prediction information, input the trend item into the initial prediction model to output second prediction information, and input the sample time series into the initial prediction model to obtain third prediction information;
[0034] A construction module, configured to construct seasonal loss, trend loss and overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series;
[0035] The training module is configured to construct a mixed loss function according to the seasonal loss, the trend loss and the overall loss, and train the initial prediction model through the mixed loss function to obtain a target prediction model.
[0036] According to a third aspect of an embodiment of the present application, a computing device is provided, including:
[0037] Memory and processor;
[0038] The memory is used to store computer-executable instructions, and the processor implements the steps of the task execution timing prediction model training method when executing the computer-executable instructions.
[0039] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the task execution timing prediction model training method are implemented.
[0040] According to a fifth aspect of an embodiment of the present application, a chip is provided, which stores a computer program, and when the computer program is executed by the chip, the steps of the task execution timing prediction model training method are implemented.
[0041] The task execution timing prediction model training method provided in the present application collects the historical task execution information of the target organization, and constructs a sample time series based on the historical task execution information; performs sequence decomposition on the sample time series to obtain the seasonal term and trend term associated with the sample time series; inputs the seasonal term into the initial prediction model to output the first prediction information, inputs the trend term into the initial prediction model to output the second prediction information, and inputs the sample time series into the initial prediction model to obtain the third prediction information; constructs seasonal loss, trend loss and overall loss based on the first prediction information, the second prediction information, the third prediction information and the sample time series; constructs a mixed loss function based on the seasonal loss, the trend loss and the overall loss, and trains the initial prediction model through the mixed loss function to obtain the target prediction model. The obtained target prediction model can achieve high-precision prediction of the task execution information of the target organization without affecting the computational efficiency, and obtain a balanced task execution plan. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 It is a flowchart of a task execution timing prediction model training method provided by an embodiment of the present application;
[0044] Figure 2 It is a model schematic diagram of a task execution timing prediction model training method provided by an embodiment of the present application;
[0045] Figure 3It is a structural schematic diagram of a task execution timing prediction model training device provided by an embodiment of the present application;
[0046] Figure 4 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0047] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0048] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0049] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0050] In the present application, a task execution timing prediction model training method is provided. The present application also relates to a task execution timing prediction model training device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0051] Figure 1 A flowchart of a task execution timing prediction model training method provided according to an embodiment of the present application is shown, which specifically includes the following steps:
[0052] Step S102: Collect historical task execution information of the target organization, and construct a sample time series based on the historical task execution information;
[0053] Step S104: performing sequence decomposition on the sample time series to obtain seasonal items and trend items associated with the sample time series;
[0054] Step S106: inputting the season item into the initial prediction model to output first prediction information, inputting the trend item into the initial prediction model to output second prediction information, and inputting the sample time series into the initial prediction model to obtain third prediction information;
[0055] Step S108: constructing seasonal loss, trend loss and overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series;
[0056] Step S110: constructing a mixed loss function according to the seasonal loss, the trend loss and the overall loss, and training the initial prediction model by using the mixed loss function to obtain a target prediction model.
[0057] Among them, the target organization can be a court, a law firm, an educational institution, etc. The specific organization type is determined by the actual usage scenario and is not limited in this embodiment; the historical task execution information represents the task allocation of the target organization over the years, including the task type and the timestamp data corresponding to each task; the process of decomposing the sample time series can adopt spectral analysis, time series analysis, Fourier series analysis, etc. The specific decomposition method adopted is determined by the actual usage scenario and is not limited in this embodiment; the initial model can adopt a neural network model with a multilayer perceptron (MLP) architecture, such as a Dlinear model, and can also adopt a neural network model with a Transformer architecture, such as a FEDformer model, a PatchTST model, etc. The specific model type selected is determined by the actual usage scenario and is not limited in this embodiment.
[0058] Based on this, historical task execution information including the task allocation of the target organization over the years is collected, and a sample time series is constructed according to the collection results. The sample time series is decomposed into seasonal terms and trend terms, and the seasonal terms, trend terms and sample time series are input into the initial model respectively. The initial model outputs the first prediction information, the second prediction information and the third prediction information for the input seasonal terms, trend terms and sample time series respectively.
[0059] According to the three prediction results output by the initial model, a loss function corresponding to the three prediction results is constructed, and a mixed loss function is constructed according to the three prediction results. The initial prediction model is trained by the mixed loss function to obtain the target prediction model. For the task planning within the preset time period of the target organization, such as the next year, the data of the pending tasks within the preset time period can be input into the target prediction model, and the target prediction model outputs the target time series, which represents the processing time points corresponding to the pending task data, and the target time series evenly distributes the pending tasks within the preset time period.
[0060] Furthermore, in step S102, the process of constructing a sample time series according to the historical task execution information, in this embodiment:
[0061] Query the missing values in the historical task execution information, and supplement the missing values through a preset interpolation algorithm; under the normal distribution assumption, based on the degree of variation of the statistical data, determine in turn whether the task data contained in the historical task execution information is an outlier; if so, remove the outlier, and supplement the outlier according to the interpolation algorithm; if not, retain the task data until all the task data are processed, obtain sample task execution information, and construct the sample time series according to the sample task execution information.
[0062] Among them, the collected historical task execution information needs to be preprocessed. Specifically, the missing value and outlier value test of the sequence needs to be performed.
[0063] Based on this, for missing values, linear interpolation or polynomial interpolation algorithms are used to fill in missing values; and outlier detection is based on statistics. Specifically, under the assumption of normal distribution, the degree of variation of statistical data is used to determine whether the data is qualified, such as 3-Sigma, which is three times the standard deviation. In the 3-Sigma method, with the mean as the center, the distance of 3 standard deviations is extended to both sides to form a band interval. If the sample data point falls within the band interval, the data is considered normal; if it falls outside the band interval, the data is considered abnormal.
[0064] Secondly, the process of outlier detection can also determine the seasonal trend of historical task execution information. For data with obvious seasonal trends, the SARIMA model is used to detect outliers. The SARIMA model mainly consists of three parts: seasonal difference, non-seasonal difference and ARMA model. Among them, seasonal difference and non-seasonal difference make the time series data stable, and the ARMA model is used to describe the time series data corresponding to the historical task execution information. Its autocorrelation and moving average properties are used to detect outliers by comparing the observed data points with the range interval predicted by the model. If the inspection result is within the predicted range, it will be retained. Otherwise, the interpolation method in the missing value is used to replace it.
[0065] In addition, it is also necessary to detect whether the time nodes in the historical task execution information are evenly spaced, specifically by observing the corresponding timestamps, or calculating the time distance between two adjacent time nodes to determine whether the two are equidistant. Since most neural network models assume that the time nodes of the data are equidistantly distributed, and for historical task execution information that is not consistent in time, it is easier for the model to learn the laws and trends of the corresponding time series, and it can ensure that the model has good generalization and interpretability.
[0066] In addition, for the training of the initial prediction model, the historical task execution information can be divided according to the specified time step, batch size, and division ratio to obtain the training set, test set, and validation set, where the training set is the sample time series. Specifically, the optimal division ratio is 7:1:2, which ensures that 20% of the data is used for testing, and sufficient verification is achieved in the model evaluation stage to obtain more reliable indicators, while the 10% validation set is optimized within a wider range of parameters. The specific division process is achieved by sliding the window size as a sample, and the batch size corresponds to the number of samples intercepted in each batch.
[0067] After the sample time series is determined, in step S104, the sample time series needs to be decomposed. The decomposition process uses seasonal trend decomposition, that is, sliding average decomposition. t Can be decomposed into S t and T t , S t and T t They represent the seasonal term and trend term of the series respectively, and each series maintains the same size as the original series.
[0068] In order for the subsequent initial prediction model to correctly use the processed data, data conversion is required. Standard standardization is used for scaling, and the data is converted to the range of 0-1 to avoid the dimensional differences between different variables affecting the model training. Then, different model frameworks are processed. For example, for models using patch architecture, the sequence needs to be converted into the required format according to the patch size, and each patch is used as a token as the input of the model. For models that do not use patches, each time point is passed into the model as a token.
[0069] Furthermore, the initial prediction model includes an attention mechanism layer, wherein the influence factor associated with the attention mechanism layer is the task type of the task data contained in the historical task execution information.
[0070] Furthermore, in step S106, the seasonal item is input into the initial prediction model to output the first prediction information. In this embodiment, the specific implementation method is as follows:
[0071] The seasonal item is feature extracted through the convolution layer of the initial prediction model to obtain the target seasonal feature; the target seasonal feature is dimensionally reduced through the pooling layer of the initial prediction model to obtain the reduced dimensional seasonal feature; the reduced dimensional seasonal feature is processed through the attention mechanism layer, and the processed result is input into the fully connected layer of the initial prediction model for processing to obtain the first prediction information, wherein, during the data processing of the initial prediction model, the discard layer of the initial prediction model randomly discards the neurons of the initial prediction model.
[0072] The initial prediction model includes a convolutional layer, a pooling layer, an attention mechanism layer, a fully connected layer, and a discard layer. Regarding the processing of seasonal items by the initial prediction model, the convolutional layer is used to extract features, and then the pooling layer is used to reduce the dimension of the feature extraction results. The attention mechanism layer processes the reduced dimension results according to the task type associated with the seasonal item, and finally obtains the first prediction information. It should be noted that the processing of trend items and sample time series is the same as above. And as Figure 2 As shown in the model schematic diagram of a task execution timing prediction model training method provided, for the convolution layer and the maximum pooling layer, in addition to a single arrangement, a multi-layer cyclic arrangement can also be used, and a dropout layer is also arranged to randomly drop some neurons to improve the robustness of the neural network model.
[0073] For example, for important problem nodes in the whole process of court case handling, there are cases where cases are not filed and cases are balanced. How to accurately supervise whether there are cases where cases are not filed and cases are balanced is the key to judicial supervision. In the actual case handling process, a large amount of statistical data is usually collected about the case filing process. These statistical data include the number of cases filed of various types, including civil, criminal, administrative, etc., and can even be divided more finely. According to a fixed time step, the number of cases filed in different courts and different types of cases is collected and summarized into a time series data set containing multiple variables, namely the sample time series X t , decompose it through seasonal trend to get the corresponding seasonal term S t and trend term T t . t , T t and X t The first prediction information, the second prediction information and the third prediction information are respectively input into the initial prediction model to obtain the first prediction information, the second prediction information and the third prediction information.
[0074] Furthermore, in step S108, the process of constructing seasonal loss, trend loss and overall loss is carried out according to the first prediction information, the second prediction information, the third prediction information and the sample time series. In this embodiment, the specific implementation method is as follows:
[0075] The seasonal loss is constructed based on the first prediction information and the sample time series; the trend loss is constructed based on the second prediction information and the sample time series; and the overall loss is constructed based on the third prediction information and the sample time series.
[0076] Using the above example, we can determine the seasonal loss Loss based on the first forecast information and the sample time series. S , according to the second prediction information and sample time series, determine the trend loss Loss T , according to the third prediction information and sample time series, determine the overall loss Loss G .
[0077] Furthermore, in step S110, a mixed loss function is constructed according to the seasonal loss, trend loss and overall loss. In this embodiment, the specific implementation is as follows:
[0078] Based on a preset first weight coefficient, the seasonal loss and the trend loss are weightedly summed to obtain a component loss function; based on a preset second weight coefficient, the component loss function and the overall loss are weightedly summed to obtain a mixed loss function.
[0079] Furthermore, in step S110, the initial prediction model is trained by a hybrid loss function to obtain a target prediction model. In this embodiment, the specific implementation is as follows:
[0080] According to a preset min-max method, the first weight coefficient and the second weight coefficient are optimized to obtain a target mixed loss function; according to the target mixed loss function, the initial prediction model is trained to obtain the target prediction model.
[0081] Using the above example, since it is impossible to determine the influence of the component loss function and the overall loss function associated with the historical task execution information, as well as the influence of the seasonal loss and the trend loss on the prediction results before the initial prediction model training is completed, the component loss function and the overall loss function are given the same emphasis, and the seasonal loss and the trend loss are given the same emphasis. Therefore, the first weight coefficient for the seasonal loss and the trend loss is set to Similarly, the second weight coefficient of the component loss function and the overall loss function is set to In the subsequent training process, the weight ratio of the two sets of weight coefficients is dynamically adjusted, but it must be ensured that the sum of the two sets of weights is a fixed value of 1.
[0082] As for the dynamic adjustment process, two min-max optimization objectives are used to balance the seasonal loss and trend loss, as well as the component loss function and the seasonal loss function. Specifically, regarding the component loss function Loss C And the overall loss function Loss G The optimization target calculation formula is as follows:
[0083]
[0084] Among them, θ is the parameter of the initial prediction model corresponding to deep learning, i is 1 or 2, and the above is calculated through the overall loss function Loss G And component loss function Loss C The size of ω1 and ω2 is used to adjust the two parameters so that the optimized mixed loss function is maximized under the current sample. S and trend loss T The optimization target calculation formula is as follows:
[0085]
[0086] Also through the above season loss Loss S and trend loss T The size of α and β is used to adjust the two parameters so that the component loss function Loss after optimization CThe maximum value under the current sample. Then, the losses calculated by the above two optimization objectives are combined to obtain the target mixed loss function, the formula is as follows:
[0087]
[0088] The target mixed loss function as the initial prediction model needs to learn the mixed loss at the end, learn the model weight parameter θ through the back propagation process of the model, and adjust the model parameters to minimize the maximum mixed loss.
[0089] In order to solve the above optimization problem, the gradient descent method is used. Specifically, the mirror gradient descent method can be used to update the parameters. Specifically, the parameters ω1, ω2, α, β are optimized according to the calculated loss. The specific calculation method is as follows:
[0090]
[0091] Where pre represents the previous update step and cur represents the current update step. i (i=1 or 2) is a hyperparameter that represents the importance of the balance weight, and its value range is [0,1]. Through the above calculation, the optimization process becomes that for each optimization step, the corresponding parameter value is calculated based on the current loss size, and the resulting mixed loss function Loss is as follows:
[0092] Loss = ω1Loss G +ω2(αLoss S +βLoss T ).
[0093] The target prediction model obtained in the above manner can accurately predict the case filing patterns of the courts. For example, during holidays such as the Spring Festival and National Day, the number of cases filed will drop significantly due to staff vacations, further leading to a holiday effect in which the number of cases in the current month is significantly different from that in other months; and in December, in order to ensure the number of cases accepted, the number of new cases filed will be controlled, resulting in a significant drop in the number of cases filed at the end of the year sprint effect, which can all be reflected in the prediction results of the target prediction model.
[0094] Moreover, the prediction results of the target prediction model can also reflect the continuous advancement of the legal system, the continuous improvement of the public's legal awareness, and the enhanced litigation awareness, which leads to the phenomenon that the number of cases filed increases year by year, as well as the increase in social contradictions accompanied by economic development. Specifically, with the development of the economy, the number of civil and commercial disputes, intellectual property cases, etc. has gradually increased, leading to the phenomenon of a continuous increase in the number of cases filed.
[0095] In addition, the prediction results of the target prediction model can also reflect the growth or decline in the number of cases caused by different temperatures in summer and winter, as well as the concentrated outbreak of certain types of cases in specific years, such as the correlation between real estate disputes and cyclical economic fluctuations.
[0096] In summary, the task execution timing prediction model training method in this embodiment, by comprehensively considering the relationship between the overall sequence and the component sequence, realizes the focus on more fine-grained components, improves the prediction effect of the components based on the time characteristics of the vacant components, and then improves the overall prediction effect, and obtains a target prediction model with high prediction accuracy; and, compared with the traditional time series prediction method, only by embedding an additional loss construction method, the data processing amount of the model is slightly affected, and the model operation efficiency will not be greatly affected.
[0097] Corresponding to the above method embodiment, the present application also provides a task execution timing prediction model training device embodiment, Figure 3 FIG. 1 is a schematic diagram showing the structure of a task execution timing prediction model training device provided by an embodiment of the present application. Figure 3 As shown, the device comprises:
[0098] The collection module 302 is configured to collect historical task execution information of the target organization and construct a sample time series based on the historical task execution information;
[0099] A decomposition module 304 is configured to perform sequence decomposition on the sample time series to obtain a seasonal term and a trend term associated with the sample time series;
[0100] The processing module 306 is configured to input the season item into the initial prediction model to output first prediction information, input the trend item into the initial prediction model to output second prediction information, and input the sample time series into the initial prediction model to obtain third prediction information;
[0101] A construction module 308 is configured to construct a seasonal loss, a trend loss and an overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series;
[0102] The training module 310 is configured to construct a mixed loss function according to the seasonal loss, the trend loss and the overall loss, and train the initial prediction model through the mixed loss function to obtain a target prediction model.
[0103] In an optional embodiment, the processing module 306 is further configured to:
[0104] The initial prediction model includes an attention mechanism layer, wherein the influence factor associated with the attention mechanism layer is the task type of the task data contained in the historical task execution information; the convolution layer of the initial prediction model is used to extract features of the season item to obtain the target season feature; the pooling layer of the initial prediction model is used to reduce the dimension of the target season feature to obtain the reduced dimension seasonal feature; the reduced dimension seasonal feature is processed by the attention mechanism layer, and the processing result is input into the fully connected layer of the initial prediction model for processing to obtain the first prediction information, wherein, during the data processing of the initial prediction model, the discard layer of the initial prediction model randomly discards the neurons of the initial prediction model.
[0105] In an optional embodiment, the acquisition module 302 is further configured to:
[0106] Query the missing values in the historical task execution information, and supplement the missing values through a preset interpolation algorithm; under the normal distribution assumption, based on the degree of variation of the statistical data, determine in turn whether the task data contained in the historical task execution information is an outlier; if so, remove the outlier, and supplement the outlier according to the interpolation algorithm; if not, retain the task data until all the task data are processed, obtain sample task execution information, and construct the sample time series according to the sample task execution information.
[0107] In an optional embodiment, the construction module 308 is further configured to:
[0108] The seasonal loss is constructed based on the first prediction information and the sample time series; the trend loss is constructed based on the second prediction information and the sample time series; and the overall loss is constructed based on the third prediction information and the sample time series.
[0109] In an optional embodiment, the training module 310 is further configured to:
[0110] Based on a preset first weight coefficient, the seasonal loss and the trend loss are weightedly summed to obtain a component loss function; based on a preset second weight coefficient, the component loss function and the overall loss are weightedly summed to obtain a mixed loss function.
[0111] In an optional embodiment, the training module 310 is further configured to:
[0112] According to a preset min-max method, the first weight coefficient and the second weight coefficient are optimized to obtain a target mixed loss function; according to the target mixed loss function, the initial prediction model is trained to obtain the target prediction model.
[0113] The task execution timing prediction model training device provided by the present application collects the historical task execution information of the target organization, and constructs a sample time series based on the historical task execution information; performs sequence decomposition on the sample time series to obtain the seasonal item and trend item associated with the sample time series; inputs the seasonal item into the initial prediction model to output the first prediction information, inputs the trend item into the initial prediction model to output the second prediction information, inputs the sample time series into the initial prediction model to obtain the third prediction information; constructs seasonal loss, trend loss and overall loss based on the first prediction information, the second prediction information, the third prediction information and the sample time series; constructs a mixed loss function based on the seasonal loss, the trend loss and the overall loss, and trains the initial prediction model through the mixed loss function to obtain the target prediction model. The obtained target prediction model can achieve high-precision prediction of the task execution information of the target organization without affecting the computational efficiency, and obtain a balanced task execution plan.
[0114] The above is a schematic scheme of a task execution timing prediction model training device of the present embodiment. It should be noted that the technical scheme of the task execution timing prediction model training device and the technical scheme of the task execution timing prediction model training method mentioned above belong to the same concept. For the details not described in detail in the technical scheme of the task execution timing prediction model training device, please refer to the description of the technical scheme of the task execution timing prediction model training method mentioned above. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through the computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.
[0115] Figure 4 The block diagram of a computing device 400 according to an embodiment of the present application is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.
[0116] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0117] In one embodiment of the present application, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0118] Computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 400 may also be a mobile or stationary server.
[0119] Among them, the processor 420 is used to execute computer executable instructions of each step of the task execution timing prediction model training method.
[0120] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the task execution timing prediction model training method described above belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the task execution timing prediction model training method described above.
[0121] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, are used to execute the steps of the task execution timing prediction model training method.
[0122] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the task execution timing prediction model training method mentioned above belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the task execution timing prediction model training method mentioned above.
[0123] An embodiment of the present application also provides a chip storing a computer program, which implements the steps of the task execution timing prediction model training method when executed by the chip.
[0124] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0125] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0126] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0127] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0128] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A task execution timing prediction model training method, characterized in that: include: Collecting historical task execution information of the target organization, and constructing a sample time series based on the historical task execution information; Performing sequence decomposition on the sample time series to obtain seasonal items and trend items associated with the sample time series; Input the season item into the initial forecast model to output first forecast information, input the trend item into the initial forecast model to output second forecast information, input the sample time series into the initial forecast model to obtain third forecast information; Constructing seasonal loss, trend loss and overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series; A mixed loss function is constructed according to the seasonal loss, the trend loss and the overall loss, and the initial prediction model is trained by the mixed loss function to obtain a target prediction model.
2. The method according to claim 1, characterized in that The initial prediction model includes an attention mechanism layer, wherein the influence factor associated with the attention mechanism layer is the task type of the task data included in the historical task execution information.
3. The method according to claim 2, characterized in that The step of inputting the seasonal term into an initial prediction model and outputting first prediction information comprises: Extracting features of the seasonal item through the convolution layer of the initial prediction model to obtain target seasonal features; Performing dimensionality reduction on the target seasonal feature through the pooling layer of the initial prediction model to obtain a dimensionality-reduced seasonal feature; The reduced-dimensional seasonal features are processed by the attention mechanism layer, and the processing results are input into the fully connected layer of the initial prediction model for processing to obtain the first prediction information, wherein, during the data processing of the initial prediction model, the discard layer of the initial prediction model randomly discards the neurons of the initial prediction model.
4. The method according to claim 1, characterized in that: The step of constructing a sample time series according to the historical task execution information includes: Querying missing values in the historical task execution information, and supplementing the missing values by a preset interpolation algorithm; Under the assumption of normal distribution, based on the degree of variation of the statistical data, it is determined in turn whether the task data contained in the historical task execution information is an abnormal value. If yes, remove the outlier and supplement the outlier according to the interpolation algorithm; If not, the task data is retained until all the task data are processed, sample task execution information is obtained, and the sample time series is constructed according to the sample task execution information.
5. The method according to claim 1, characterized in that The constructing of seasonal loss, trend loss and overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series includes: constructing the seasonal loss according to the first prediction information and the sample time series; constructing the trend loss according to the second prediction information and the sample time series; The overall loss is constructed according to the third prediction information and the sample time series.
6. The method according to claim 1, characterized in that The constructing a mixed loss function according to the seasonal loss, the trend loss and the overall loss includes: Based on a preset first weight coefficient, weighted summing the seasonal loss and the trend loss is performed to obtain a component loss function; Based on a preset second weight coefficient, the component loss function and the overall loss are weightedly summed to obtain a mixed loss function.
7. The method according to claim 6, characterized in that The step of training the initial prediction model by using the hybrid loss function to obtain a target prediction model includes: According to a preset min-max method, the first weight coefficient and the second weight coefficient are optimized to obtain a target hybrid loss function; The initial prediction model is trained according to the target mixed loss function to obtain the target prediction model.
8. A task execution timing prediction model training device, characterized in that: include: A collection module configured to collect historical task execution information of a target organization and construct a sample time series based on the historical task execution information; A decomposition module is configured to perform sequence decomposition on the sample time series to obtain a seasonal term and a trend term associated with the sample time series; A processing module is configured to input the season item into an initial prediction model to output first prediction information, input the trend item into the initial prediction model to output second prediction information, and input the sample time series into the initial prediction model to obtain third prediction information; A construction module, configured to construct seasonal loss, trend loss and overall loss according to the first prediction information, the second prediction information, the third prediction information and the sample time series; The training module is configured to construct a mixed loss function according to the seasonal loss, the trend loss and the overall loss, and train the initial prediction model through the mixed loss function to obtain a target prediction model.
9. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the task execution timing prediction model training method described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by the processor, the steps of the task execution timing prediction model training method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Criminal period prediction method based on probability graph model
CN112116172A
Click rate prediction method based on heterogeneous behaviors in session
CN114529077A
Drainage basin multi-point water level prediction and early warning method based on generative adversarial network
CN115688579A
Service information processing method and device and computer equipment
CN116307227A
Time sequence prediction method based on decomposition mechanism and attention mechanism
CN116579447A