Time sequence prediction method and device

By using historical time series data and dynamic vocabulary to generate dynamic prompt words in supply chain scenarios, and combining prediction models to make predictions, the problem of low prediction accuracy in the existing technology is solved, and higher prediction accuracy and accuracy are achieved .

CN118982382APending Publication Date: 2024-11-19LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411046245.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

In the prior art, the accuracy of supply chain timing data prediction is low, making it difficult to accurately predict future data.

Method used

By obtaining historical timing data and dynamic vocabulary in supply chain scenarios, dynamic prompt words are generated, and predictions are made using prediction models. Dynamic prompt words reflect the key features of historical timing data to improve prediction accuracy.

Benefits of technology

Improve the prediction accuracy of future time series data, making the prediction results more accurate and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982382A_ABST
    Figure CN118982382A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence prediction method and device, and the method comprises the steps: obtaining historical time sequence data corresponding to a target object, the target object being an object in a supply chain scene, and the historical time sequence data representing data corresponding to the target object at a plurality of historical times; obtaining a dynamic word library corresponding to the historical time sequence data; generating a dynamic cue word corresponding to the historical time sequence data according to the historical time sequence data and a dynamic word library; according to the dynamic cue word, future time series data corresponding to the target object are predicted based on the prediction large model, and the future time series data comprise data corresponding to the target object in at least one future time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of supply chain technology, and in particular to a time series forecasting method and device. Background Art

[0002] Supply chain refers to the network structure formed by upstream and downstream enterprises involved in the production and circulation process, which provides products or services to end users. Time series data refers to a series of data recorded in time sequence. Accurate supply chain time series data forecasting will affect all links in the supply chain and is one of the important topics for reducing costs and increasing efficiency. For example, given the sales volume of a certain computer model every month in the past year, predicting the sales volume of the same computer model next month is a typical computer manufacturing supply chain time series forecasting problem.

[0003] Currently, there are solutions for predicting supply chain time series data through large models, but the prediction accuracy of the above solutions is low. Summary of the invention

[0004] An embodiment of the present application provides a time series prediction method, including: obtaining historical time series data corresponding to a target object, the target object being an object in a supply chain scenario, the historical time series data representing data corresponding to the target object at multiple historical times; and obtaining a dynamic vocabulary library corresponding to the historical time series data; generating dynamic prompt words corresponding to the historical time series data based on the historical time series data and the dynamic vocabulary library; and predicting future time series data corresponding to the target object based on a prediction large model based on the dynamic prompt words, the future time series data including data corresponding to the target object at at least one future time.

[0005] In some embodiments, dynamic prompt words corresponding to the historical time series data are generated according to the historical time series data and the dynamic vocabulary, including: according to the historical time series data and the dynamic vocabulary, the dynamic prompt words are generated by a prompt word generation model, and the prompt word generation model is determined after adjusting parameters of the prompt word generation initial model based on sample prompt words generated by the prompt word generation initial model.

[0006] In some embodiments, the process of determining the prompt word generation model includes: obtaining sample historical time series data and a sample dynamic vocabulary corresponding to the object sample; generating the sample prompt word using the prompt word generation initial model based on the sample historical time series data and the sample dynamic vocabulary; determining the evaluation result of the prompt word generation initial model based on the sample prompt word using the target evaluation index; and adjusting the parameters of the prompt word generation initial model based on the evaluation result to obtain the prompt word generation model.

[0007] In some embodiments, based on the sample prompt word, the target evaluation index is used to determine the evaluation result of the initial model generated for the prompt word, including: based on the sample prompt word, using the prediction large model to predict the sample future time series data corresponding to the object sample; based on the sample future time series data and the label value, determining the evaluation value corresponding to the target evaluation index, the label value is the real future time series data corresponding to the sample future time series data; and determining the evaluation result based on the evaluation value.

[0008] In some embodiments, the parameters of the initial model for generating prompt words are adjusted according to the evaluation results, including: inputting the parameters to be adjusted in the initial model for generating prompt words into a multilayer perceptron; adjusting the input parameters to be adjusted using the multilayer perceptron according to the evaluation results to obtain target parameters; replacing the parameters to be adjusted in the initial model for generating prompt words with the target parameters to complete an adjustment of the initial model for generating prompt words; determining a new evaluation result corresponding to the target parameters, and determining that the parameter adjustment of the initial model for generating prompt words is completed when the new evaluation result meets the target condition or the number of parameter adjustments reaches the target number of times.

[0009] In some embodiments, the target evaluation indicator is an average error determined by multiple sample future time series data and corresponding label values.

[0010] In some embodiments, obtaining a dynamic vocabulary corresponding to the historical time series data includes: obtaining description information of the historical time series data; determining a vocabulary in a vocabulary set that matches the description information, and determining the matching vocabulary as the dynamic vocabulary; or, generating the dynamic vocabulary using a vocabulary generation model based on the description information.

[0011] In some embodiments, the dynamic vocabulary is generated according to the description information using a vocabulary generation model, including: according to the description information, using the vocabulary generation model to obtain a plurality of descriptive words related to the field to which the target object belongs from a target data source; and generating the dynamic vocabulary based on each of the description words.

[0012] In some embodiments, the vocabulary generation model includes a basic word generation model and a description word generation model. According to the description information, the dynamic vocabulary is generated using the vocabulary generation model, including: according to the description information, using the basic word generation model to obtain multiple basic words related to the field to which the target object belongs from the target data source; using the description word generation model to combine each of the basic words to generate multiple description words; generating the dynamic vocabulary based on each of the description words.

[0013] The embodiment of the present application also proposes a time series prediction device, including: an acquisition module, used to obtain historical time series data corresponding to a target object, the target object is an object in a supply chain scenario, and the historical time series data represents data corresponding to the target object at multiple historical times; and obtain a dynamic vocabulary corresponding to the historical time series data; a generation module, used to generate dynamic prompt words corresponding to the historical time series data based on the historical time series data and the dynamic vocabulary; a prediction module, used to predict future time series data corresponding to the target object based on a prediction large model according to the dynamic prompt words, and the future time series data includes data corresponding to the target object at at least one future time. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solution 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 recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 A flowchart of a timing prediction method according to an embodiment of the present application;

[0016] Figure 2 A flowchart of a process for determining a prompt word generation model in an embodiment of the present application;

[0017] Figure 3 A flowchart for determining an evaluation result of generating an initial model for a prompt word in an embodiment of the present application;

[0018] Figure 4 This is a flow chart of adjusting parameters of the initial model for generating prompt words in an embodiment of the present application;

[0019] Figure 5 A flowchart of obtaining a dynamic vocabulary according to an embodiment of the present application;

[0020] Figure 6 A flowchart of generating a dynamic vocabulary using a vocabulary generation model according to an embodiment of the present application;

[0021] Figure 7 A flowchart of generating a dynamic vocabulary using a vocabulary generation model according to another embodiment of the present application;

[0022] Figure 8 A schematic diagram of a model for determining prompt words to generate an embodiment of the present application;

[0023] Fig. 9 A schematic diagram of generating a dynamic vocabulary library according to an embodiment of the present application;

[0024] Fig.10A schematic diagram of generating dynamic prompt words according to an embodiment of the present application;

[0025] Fig.11 4 is a structural block diagram of a timing prediction device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0027] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0028] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0029] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0030] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0031] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0032] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0033] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0034] A time series prediction method in an embodiment of the present application generates dynamic prompt words based on historical time series data and a dynamic vocabulary, so that the dynamic prompt words can accurately reflect the key features of the historical time series data, thereby improving the prediction accuracy of future time series data.

[0035] like Figure 1 As shown, the method comprises the following steps:

[0036] Step S101, obtaining historical time series data corresponding to a target object, wherein the target object is an object in a supply chain scenario, and the historical time series data represents data corresponding to the target object at multiple historical times; and obtaining a dynamic vocabulary corresponding to the historical time series data.

[0037] In this embodiment, the target object may be a commodity, raw material, component, etc. in the supply chain scenario, for example, the target object is a laptop computer, or a display screen, network card, camera, and other components of the laptop computer. The supply chain scenario may include logistics links, sales links, after-sales service links, manufacturing links, delivery links, return / recycling links, etc., and the target objects in different links may correspond to different historical time series data. For example, when the target object is a laptop computer in the sales link, the historical time series data may be the daily sales volume of laptop computers in the past week; when the target object is a laptop computer in the logistics link, the historical time series data may be the daily transportation volume of laptop computers in the past month; when the target object is a laptop computer in the after-sales service link, the historical time series data may be the number of after-sales service requests for laptop computers per week in the past month.

[0038] The historical time series data corresponding to the target object can be obtained from the locally stored data in response to an acquisition instruction issued by the user or automatically triggered, or the historical time series data can be stored in other servers in advance and the historical time series data corresponding to the target object can be obtained based on the data received from other servers.

[0039] The dynamic word library includes multiple descriptive words related to the historical time series data. The corresponding descriptive words can be determined according to the field to which the historical time series data belongs to, and the dynamic word library can be established. For example, if the historical time series data is the daily sales volume of a certain model of laptop computers in the past week, the descriptive words in the dynamic word library can be "past, laptop computer, sales volume, sell, week, day, day, unit, steady climb, model", etc. The dynamic word library can be generated in advance or in real time.

[0040] By obtaining the historical time series data corresponding to the target object and the dynamic vocabulary corresponding to the historical time series, dynamic prompt words can be generated according to the historical time series data and the dynamic vocabulary.

[0041] Step S102: Generate dynamic prompt words corresponding to the historical time series data according to the historical time series data and the dynamic word library.

[0042] In this embodiment, the dynamic prompt words can be in the form of text, images, sounds, and other forms. The dynamic prompt words are used to trigger the prediction model to respond, so that the prediction model pre-outputs the prediction results. In order to make the prediction model respond better, it is necessary to first generate dynamic prompt words based on historical time series data and dynamic word library.

[0043] For example, if the historical time series data is 10, 11, 12, and 13, which are the daily sales of T14_4 in the past four days, and the descriptive words in the dynamic vocabulary include "past, tomorrow, computer, sales, unit, is, day, steadily climbing, average, sell", then the generated dynamic prompt words can be: "T14_4 is a business laptop computer. The recent daily sales are 10, 11, 12, and 13, and it is steadily climbing. Forecast tomorrow's sales."

[0044] Step S103, predicting the future time series data corresponding to the target object based on the prediction big model according to the dynamic prompt word, the future time series data including the data corresponding to the target object at at least one future time.

[0045] In this embodiment, the prediction big model is a pre-trained machine learning model with a large number of parameters and computing resources. After the dynamic prompt words are generated, the dynamic prompt words are input into the prediction big model, and the prediction big model predicts the future time series data corresponding to the target object. The future time series data can be data corresponding to a future time, such as the sales volume of laptops tomorrow, or data corresponding to multiple future times, such as the daily sales volume of laptops in the next three days.

[0046] Optionally, the prediction large model can be any one of the large language models including GPT-4Turbo, GLM-4, Qwen-Max, Qwen-72-Chat, MT-DNN, Megatron-Turing NLG, etc.

[0047] The time series prediction method of the embodiment of the present application obtains the historical time series data corresponding to the target object, the target object is an object in the supply chain scenario, and the historical time series data represents the data corresponding to the target object at multiple historical times; and obtains the dynamic vocabulary corresponding to the historical time series data; generates dynamic prompt words corresponding to the historical time series data based on the historical time series data and the dynamic vocabulary; and predicts the future time series data corresponding to the target object based on the dynamic prompt words based on the prediction big model, and the future time series data includes the data corresponding to the target object at at least one future time. Since the dynamic prompt words are generated based on the historical time series data and the dynamic vocabulary, the dynamic prompt words can accurately reflect the key features of the historical time series data, thereby improving the prediction accuracy of future time series data.

[0048] In some embodiments of the present application, generating a dynamic prompt word corresponding to the historical time series data according to the historical time series data and the dynamic word library includes:

[0049] The dynamic prompt word is generated by using a prompt word generation model according to the historical time series data and the dynamic word library. The prompt word generation model is determined after adjusting parameters of the prompt word generation initial model based on sample prompt words generated by the prompt word generation initial model.

[0050] In this embodiment, an initial model for generating prompt words is pre-built, and a sample prompt word is generated using the initial model for generating prompt words. Then, parameters of the initial model for generating prompt words are adjusted according to the sample prompt words. After the parameter adjustment is completed, a prompt word generation model is obtained. After obtaining the historical time series data and the dynamic word library, the historical time series data and the dynamic word library are input into the prompt word generation model, and the prompt word generation model outputs the dynamic prompt word, thereby realizing more efficient and accurate generation of dynamic prompt words.

[0051] Optionally, the prompt word generation model can be a large model, or a machine learning model or a neural network model other than the large model.

[0052] In some embodiments of the present application, Figure 2 As shown, the process of determining the prompt word generation model includes the following steps:

[0053] Step S201, obtaining sample historical time series data and sample dynamic vocabulary corresponding to the object sample.

[0054] In this embodiment, a variety of different types of object samples can be acquired, and sample historical time series data corresponding to each object sample and a sample dynamic vocabulary corresponding to the sample historical time series data can be obtained.

[0055] Step S202: Generate the sample prompt word using the prompt word generation initial model according to the sample historical time series data and the sample dynamic word library.

[0056] An initial model for generating prompt words is established in advance, sample historical time series data and a sample dynamic word library are input into the initial model for generating prompt words, and the initial model for generating prompt words generates sample prompt words.

[0057] Step S203: Determine, according to the sample prompt words, an evaluation result of generating an initial model for the prompt words using a target evaluation index.

[0058] The target evaluation index is used to evaluate the performance of the initial model for generating prompt words. An evaluation value corresponding to the target evaluation index can be determined based on the sample prompt words, and an evaluation result of the initial model for generating prompt words can be determined based on the evaluation value.

[0059] Optionally, the target evaluation indicator can be any one of mean square error, root mean square error, mean absolute error, mean absolute percentage error, mean absolute percentage error, mean square symmetric error, median absolute error, etc.

[0060] Step S204: adjusting parameters of the initial model for generating prompt words according to the evaluation result to obtain the prompt word generation model.

[0061] In this embodiment, when adjusting the parameters, some parameters in the prompt word generation initial model may be adjusted, or all parameters in the prompt word generation initial model may be adjusted. The prompt word generation initial model is adjusted according to the evaluation results to optimize the performance of the prompt word generation initial model. After the parameter adjustment is completed, the prompt word generation model is obtained.

[0062] The sample prompt words generated by the prompt word generation initial model are evaluated using the target evaluation index, and the prompt word generation model is obtained after adjusting the parameters according to the evaluation results, thereby improving the accuracy of the prompt word model.

[0063] In some embodiments of the present application, based on the sample prompt word, the target evaluation index is used to determine the evaluation result of generating the initial model for the prompt word, such as Figure 3 As shown, the following steps are included:

[0064] Step 2031, based on the sample prompt word, use the prediction large model to predict the future time series data of the sample corresponding to the object sample.

[0065] In this embodiment, the evaluation result is determined by the sample future time series data corresponding to the sample prompt word. The sample prompt word is input into the prediction model, so that the prediction model predicts the sample future time series data corresponding to the object sample.

[0066] Step 2032: Determine an evaluation value corresponding to the target evaluation indicator based on the sample future time series data and the label value, wherein the label value is the real future time series data corresponding to the sample future time series data.

[0067] In this embodiment, the label value is the real future time series data corresponding to the sample future time series data. The error between the predicted sample future time series data and the label value can be determined, and an evaluation value corresponding to the target evaluation indicator can be generated based on the error.

[0068] Among them, the vector of the sample's future time series data and the vector of the label value can be determined first, and the error can be determined based on the distance between the two vectors.

[0069] Step 2033: Determine the evaluation result according to the evaluation value.

[0070] The evaluation value corresponding to the target evaluation index is determined by the future time series data and label value of the sample, so that the evaluation value accurately reflects the effectiveness of the sample prompt word, thereby achieving a more accurate evaluation of the initial model for prompt word generation.

[0071] In some embodiments of the present application, the parameters of the initial model for generating the prompt word are adjusted according to the evaluation result, such as Figure 4 As shown, the following steps are included:

[0072] Step S2041, inputting the parameters to be adjusted in the initial model for generating the prompt words into a multi-layer perceptron.

[0073] In this embodiment, a multilayer perceptron (MLP) is a basic artificial neural network model, and its structure is composed of a multilayer structure composed of multiple neurons. The basic structure of MLP includes an input layer, an output layer, and at least one or more hidden layers. MLP can handle complex nonlinear relationships and automatically extract high-level features of data by introducing a multilayer structure and a nonlinear activation function.

[0074] The parameters to be adjusted may be part of the parameters in the initial model for generating prompt words, or may be all of the parameters in the initial model for generating prompt words. The parameters to be adjusted in the initial model for generating prompt words are input into the multi-layer perceptron.

[0075] Step S2042: According to the evaluation result, the input parameters to be adjusted are adjusted using the multilayer perceptron to obtain target parameters.

[0076] In this embodiment, if the evaluation result is data that can be directly recognized by the multilayer perceptron, the evaluation result can be input into the multilayer perceptron, and the multilayer perceptron adjusts the input parameters to be adjusted to obtain the target parameters. If the evaluation result is not data that can be directly recognized by the multilayer perceptron, the evaluation result is first converted into target data that can be directly recognized by the multilayer perceptron, and the target data is input into the multilayer perceptron, and the multilayer perceptron adjusts the input parameters to be adjusted to obtain the target parameters. For example, if the evaluation result is the average error, since the multilayer perceptron cannot directly recognize the average error, it is necessary to first convert the average error into an evaluation score according to the corresponding relationship, and then input the evaluation score into the multilayer perceptron.

[0077] Step S2043: using the target parameters to replace the parameters to be adjusted in the prompt word generation initial model, so as to complete an adjustment of the prompt word generation initial model.

[0078] After the target parameters are obtained, the target parameters are input into the prompt word generation initial model and the corresponding parameters to be adjusted are replaced to complete an adjustment of the prompt word generation initial model.

[0079] Step S2044, determining a new evaluation result corresponding to the target parameter, and when the new evaluation result meets the target condition, or the number of parameter adjustments reaches the target number, determining that the parameter adjustment of the prompt word generation initial model is completed.

[0080] After completing one adjustment of the prompt word generation initial model, a new evaluation result is determined again according to steps S2031 to S2033. If the new evaluation result meets the target condition, or the number of parameter adjustments reaches the target number, the parameter adjustment of the prompt word generation initial model is completed. The target condition may be that the model error corresponding to the new evaluation result is less than the target error, or the evaluation score corresponding to the new evaluation result reaches the target score.

[0081] By setting a multi-layer perceptron to adjust the parameters of the initial model for generating prompt words, the efficiency and accuracy of parameter adjustment are improved.

[0082] Optionally, a convolutional neural network may be used instead of a multilayer perceptron.

[0083] In some embodiments of the present application, the target evaluation indicator is an average error determined by multiple sample future time series data and corresponding label values.

[0084] In this embodiment, the average error may be a mean absolute percentage error, a mean absolute error, or a symmetric mean absolute percentage error. The average error is determined by multiple sample future time series data and corresponding label values, thereby improving the accuracy of the evaluation result.

[0085] In the specific application scenario of this application, the average error adopts the mean absolute percentage error, and the evaluation value of the evaluation result is the evaluation score corresponding to the mean absolute percentage error. Suppose the sample time series data is x, the sample prompt word is z, then the sample future time series data can be expressed as y LM (z,x), mean absolute percentage error S = -MAPE, Represents the evaluation score corresponding to the mean absolute percentage error. The evaluation score is input into the multi-layer perceptron, and the multi-layer parameters are adjusted by maximizing the evaluation score.

[0086] Maximizing the evaluation score can be expressed as: Among them, z t =1 indicates the first character of the sample prompt word, z t =T represents the last character of the sample prompt word, represents the current prompt word, T represents the total character length of the sample prompt word, z<t represents the sample prompt word generated in the previous round, Represents the current sample cue word generated when the previous sample cue word is known.

[0087] In some embodiments of the present application, a dynamic word library corresponding to the historical time series data is obtained, such as Figure 5 As shown, the following steps are included:

[0088] Step S301, obtain the description information of the historical time series data, and execute step S302 or step S303.

[0089] In this embodiment, the description information may be obtained according to the attributes of the historical time series data. For example, if the historical time series data is computer sales data, the description information may be “supply chain time series data, computer sales”.

[0090] Step S302: determine a word library in a word library set that matches the description information, and determine the matching word library as the dynamic word library.

[0091] In this embodiment, the word library set includes a plurality of pre-generated word libraries. By determining a word library in the word library set that matches the description information and determining the matching word library as a dynamic word library, it is possible to efficiently obtain a dynamic word library.

[0092] Step S303 generates the dynamic vocabulary using a vocabulary generation model according to the description information.

[0093] In this embodiment, if there is no matching vocabulary in the vocabulary set or the matching vocabulary needs to be updated, a dynamic vocabulary can be generated in real time. Specifically, a vocabulary generation model is established in advance, and the dynamic vocabulary is generated using the vocabulary generation model based on the description information, thereby ensuring that an accurate dynamic vocabulary is obtained.

[0094] In some embodiments of the present application, the dynamic vocabulary is generated by using a vocabulary generation model according to the description information, such as Figure 6 As shown, the following steps are included:

[0095] Step S311: According to the description information, a plurality of description words related to the field to which the target object belongs are acquired from a target data source using the word library generation model.

[0096] In this embodiment, the target data source can be a local data source related to the field to which the target object belongs, or a data source related to the field to which the target object belongs in the network. According to the description information, the word library generation model is used to perform data mining from the target data source to obtain multiple descriptive words related to the field to which the target object belongs. For example, if the description information is "supply chain time series data, computer sales", the obtained descriptive words can be "past, tomorrow, computer, sales, units, is, day, steady climb, sudden increase, mean, sell".

[0097] Step S312: Generate the dynamic word library based on each of the description words.

[0098] According to the description information, the word library generation model is used to obtain the description words from the target data source and generate a dynamic word library, so as to achieve more efficient generation of the dynamic word library.

[0099] In some embodiments of the present application, as an alternative, the word library generation model includes a basic word generation model and a description word generation model, such as Figure 7 As shown, according to the description information, the dynamic vocabulary is generated using a vocabulary generation model, including the following steps:

[0100] Step S321, based on the description information, a large model is generated using the basic words to obtain a plurality of basic words related to the field to which the target object belongs from a target data source.

[0101] In this embodiment, based on the description information, a basic word large model is used to perform data mining from the target data source to obtain multiple basic words. For example, if the description information is "supply chain time series data, computer sales", the basic words obtained may be "increase, decrease, stable, sudden, average, maximum".

[0102] Step S322, using the description word generation large model to combine the basic words to generate multiple description words.

[0103] In this embodiment, after obtaining each basic word, the basic words are combined according to the large model for generating description words to generate multiple description words to better represent the statistical characteristics of the time series data. For example, if the basic words obtained are "increase, decrease, steady, sudden, average, maximum", then the description words can be "steady climb, sudden increase".

[0104] Step S323: Generate the dynamic vocabulary based on each of the description words.

[0105] First, the basic words are obtained through the basic word generation model, and then the basic words are combined through the description word generation model to generate multiple description words. This can avoid the model hallucination that may be caused by a single vocabulary generation model and further improve the accuracy of the dynamic vocabulary.

[0106] In some embodiments of the present application, the dynamic vocabulary is provided with an editing interface, through which the user can use expert knowledge to adjust the descriptive words in the dynamic vocabulary, which can further improve the accuracy of the dynamic vocabulary.

[0107] In order to further explain the technical idea of ​​the present application, the technical solution of the present application is now described in combination with specific application scenarios.

[0108] The present invention provides a method for predicting a time series, comprising the following steps:

[0109] Step S1, generating a prompt word generation model.

[0110] In this embodiment, an initial model for prompt word generation is established and a multi-layer perceptron is configured. The sample historical time series data and the sample dynamic vocabulary corresponding to the object sample are input into the initial model for prompt word generation. The initial model for prompt word generation generates sample prompt words. The sample prompt words are input into the prediction large model to obtain sample future time series data corresponding to the object sample. After obtaining multiple sample future time series data, the average absolute percentage error is determined based on the multiple sample future time series data and the corresponding label values, and then an evaluation score corresponding to the average absolute percentage error is determined. The evaluation score is input into the multi-layer perceptron. The initial model for prompt word generation is subjected to multiple rounds of parameter adjustment through the multi-layer perceptron. When the evaluation score reaches the target score, the prompt word generation model is obtained.

[0111] like Figure 8 As shown, the sample historical time series data includes "10, 11, 12, 13", the sample dynamic vocabulary includes "past, tomorrow, computer, sales, unit, is, day, steady climb, mean, sell", each sample prompt word includes prompt word A, prompt word B, prompt word C, and each sample future time series data is A prediction, B prediction and C prediction respectively.

[0112] The parameter adjustment process is as follows: the prompt word generation initial model first generates prompt word A and prompt word B in sequence, and then inputs prompt word A and prompt word B into the prediction large model to obtain A prediction and B prediction respectively, determines the average absolute percentage error between A prediction, B prediction and the corresponding label value, determines the evaluation score according to the average absolute percentage error, and then inputs the evaluation score into the multilayer perceptron. After the multilayer perceptron substitutes the adjusted target parameters into the prompt word generation initial model, the prompt word generation initial model generates prompt word C, and inputs prompt word C into the prediction large model to obtain C prediction. Then, the average absolute percentage error between A prediction, B prediction, C prediction and the corresponding label value is determined, and then a new evaluation score is determined according to the average absolute percentage error. The new evaluation score is input into the multilayer perceptron, and so on. When the evaluation score reaches the target score, the prompt word generation model is obtained.

[0113] Step S2, obtaining the historical time series data corresponding to the target object.

[0114] In this embodiment, the target object is the T14_4 business notebook computer, and the historical time series data is "10, 11, 12, 13", which indicates the daily sales volume of the T14_4 business notebook computer in the past 4 days.

[0115] Step S3, obtaining a dynamic vocabulary corresponding to the historical time series data.

[0116] In this embodiment, descriptive information of historical time series data is obtained, and based on the descriptive information, a basic word generation model is used to obtain multiple basic words related to the field to which the target object belongs from the target data source; the description word generation model is used to combine the basic words to generate multiple description words; and a dynamic vocabulary is generated based on the description words and expert knowledge.

[0117] like Fig. 9 ,The description information is “supply chain time series data; computer sales”, the basic words are “increase, decrease, steady, sudden, average, maximum”, and the description words include “steady climb, sudden increase”, and the description words in the dynamic vocabulary are “past, tomorrow, computer, sales, units, are, days, steady climb, average, sell”.

[0118] Step S4, based on the historical time series data and the dynamic word library, a prompt word generation model is used to generate dynamic prompt words corresponding to the historical time series data.

[0119] like Fig.10 As shown, the historical time series data and the dynamic vocabulary are input into the vocabulary generation model to obtain the dynamic prompt word "T14_4 is a business laptop computer. The recent daily sales are 10, 11, 12, and 13, and are steadily increasing. The sales are predicted for tomorrow."

[0120] Step S5, predicting the future time series data corresponding to the target object based on the dynamic prompt word and the prediction large model.

[0121] The dynamic prompt words are input into the prediction model so that the prediction model can predict the sales volume of T14_4 business notebook computers tomorrow.

[0122] The present application also proposes a time series prediction device, such as Fig.11 As shown, it includes: an acquisition module, used to obtain historical time series data corresponding to a target object, the target object is an object in a supply chain scenario, and the historical time series data represents data corresponding to the target object at multiple historical times; and obtain a dynamic vocabulary library corresponding to the historical time series data; a generation module, used to generate dynamic prompt words corresponding to the historical time series data based on the historical time series data and the dynamic vocabulary library; a prediction module, used to predict future time series data corresponding to the target object based on a prediction large model according to the dynamic prompt words, and the future time series data includes data corresponding to the target object at at least one future time.

[0123] The time series prediction device of the embodiment of the present application obtains a dynamic vocabulary through an acquisition module, and generates dynamic prompt words according to historical time series data and the dynamic vocabulary through a generation module, so that the dynamic prompt words can accurately reflect the key features of the historical time series data, thereby improving the prediction accuracy of future time series data.

[0124] In a specific application scenario, the generation module is specifically used to: generate the dynamic prompt word using a prompt word generation model according to the historical time series data and the dynamic vocabulary, and the prompt word generation model is determined after adjusting the parameters of the prompt word generation initial model based on sample prompt words generated by the prompt word generation initial model.

[0125] In a specific application scenario, the process of determining the prompt word generation model includes: obtaining sample historical time series data and a sample dynamic vocabulary corresponding to the object sample; generating the sample prompt word using the prompt word generation initial model based on the sample historical time series data and the sample dynamic vocabulary; determining the evaluation result of the prompt word generation initial model based on the sample prompt word using the target evaluation index; and adjusting the parameters of the prompt word generation initial model based on the evaluation result to obtain the prompt word generation model.

[0126] In a specific application scenario, based on the sample prompt word, the target evaluation index is used to determine the evaluation result of the initial model generated for the prompt word, including: based on the sample prompt word, using the prediction large model to predict the sample future time series data corresponding to the object sample; based on the sample future time series data and the label value, determining the evaluation value corresponding to the target evaluation index, the label value is the real future time series data corresponding to the sample future time series data; and determining the evaluation result based on the evaluation value.

[0127] In a specific application scenario, the parameters of the initial model for generating prompt words are adjusted according to the evaluation results, including: inputting the parameters to be adjusted in the initial model for generating prompt words into a multilayer perceptron; adjusting the input parameters to be adjusted using the multilayer perceptron according to the evaluation results to obtain target parameters; replacing the parameters to be adjusted in the initial model for generating prompt words with the target parameters to complete an adjustment of the initial model for generating prompt words; determining a new evaluation result corresponding to the target parameter, and when the new evaluation result meets the target condition or the number of parameter adjustments reaches the target number, determining that the parameter adjustment of the initial model for generating prompt words is completed.

[0128] In a specific application scenario, the target evaluation indicator is an average error determined by future time series data of multiple samples and corresponding label values.

[0129] In a specific application scenario, the acquisition module is specifically used to: obtain the description information of the historical time series data; determine the vocabulary in the vocabulary set that matches the description information, and determine the matching vocabulary as the dynamic vocabulary; or, based on the description information, generate the dynamic vocabulary using a vocabulary generation model.

[0130] In a specific application scenario, the acquisition module is also specifically used to: generate the dynamic vocabulary based on the description information using the vocabulary generation model, including: according to the description information, using the vocabulary generation model to obtain multiple descriptive words related to the field to which the target object belongs from the target data source; generate the dynamic vocabulary based on each of the description words.

[0131] In a specific application scenario, the vocabulary generation model includes a basic word generation model and a description word generation model, and the acquisition module is also specifically used to: according to the description information, use the basic word generation model to obtain multiple basic words related to the field to which the target object belongs from the target data source; use the description word generation model to combine each of the basic words to generate multiple description words; generate the dynamic vocabulary based on each of the description words.

[0132] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0133] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A time series prediction method, comprising: Obtaining historical time series data corresponding to a target object, where the target object is an object in a supply chain scenario, and the historical time series data represents data corresponding to the target object at multiple historical times; and obtaining a dynamic vocabulary corresponding to the historical time series data; Generate a dynamic prompt word corresponding to the historical time series data according to the historical time series data and the dynamic word library; According to the dynamic prompt word, future time series data corresponding to the target object is predicted based on the prediction big model, and the future time series data includes data corresponding to the target object at at least one future time.

2. The time series prediction method according to claim 1, generating a dynamic prompt word corresponding to the historical time series data according to the historical time series data and the dynamic word library, comprising: The dynamic prompt word is generated by using a prompt word generation model according to the historical time series data and the dynamic word library. The prompt word generation model is determined after adjusting parameters of the prompt word generation initial model based on sample prompt words generated by the prompt word generation initial model.

3. The time series prediction method according to claim 2, wherein the process of determining the prompt word generation model comprises: Obtaining sample historical time series data and sample dynamic vocabulary corresponding to the object sample; Generate the sample prompt word using the prompt word generation initial model according to the sample historical time series data and the sample dynamic word library; According to the sample prompt words, determining the evaluation result of generating the initial model for the prompt words by using the target evaluation index; The parameters of the initial model for generating the prompt word are adjusted according to the evaluation result to obtain the prompt word generation model.

4. The time series prediction method according to claim 3, wherein the evaluation result of generating the initial model for the prompt word is determined by using a target evaluation index according to the sample prompt word, comprising: According to the sample prompt word, using the prediction large model to predict the future time series data of the sample corresponding to the object sample; Determine an evaluation value corresponding to the target evaluation indicator according to the sample future time series data and a label value, wherein the label value is the real future time series data corresponding to the sample future time series data; The evaluation result is determined according to the evaluation value.

5. The time series prediction method according to claim 3, wherein the parameters of the initial model for generating the prompt word are adjusted according to the evaluation result, comprising: Inputting the parameters to be adjusted in the initial model for generating the prompt word into a multi-layer perceptron; According to the evaluation result, the input parameters to be adjusted are adjusted using the multi-layer perceptron to obtain target parameters; Using the target parameters to replace the parameters to be adjusted in the prompt word generation initial model, so as to complete an adjustment of the prompt word generation initial model; A new evaluation result corresponding to the target parameter is determined, and when the new evaluation result meets the target condition or the number of parameter adjustments reaches the target number, it is determined that the parameter adjustment of the prompt word generation initial model is completed.

6. In the time series prediction method as described in claim 3, the target evaluation indicator is an average error determined by multiple sample future time series data and corresponding label values.

7. The time series prediction method according to claim 1, wherein obtaining a dynamic vocabulary corresponding to the historical time series data comprises: Obtaining description information of the historical time series data; Determine a word library in the word library set that matches the description information, and determine the matching word library as the dynamic word library; or, The dynamic vocabulary is generated according to the description information using a vocabulary generation model.

8. The time series prediction method according to claim 7, wherein the dynamic vocabulary is generated by using a vocabulary generation model according to the description information, comprising: According to the description information, using the word library generation model to obtain a plurality of description words related to the field to which the target object belongs from a target data source; The dynamic word library is generated based on each of the description words.

9. The time series prediction method according to claim 7, wherein the word library generation model includes a basic word generation model and a description word generation model, and the dynamic word library is generated by using the word library generation model according to the description information, including: According to the description information, a large model is generated by using the basic words to acquire a plurality of basic words related to the field to which the target object belongs from a target data source; Using the description word generation model to combine the basic words to generate multiple description words; The dynamic word library is generated based on each of the description words.

10. A time series prediction device, comprising: An acquisition module, used to obtain historical time series data corresponding to a target object, wherein the target object is an object in a supply chain scenario, and the historical time series data represents data corresponding to the target object at multiple historical times; and obtaining a dynamic vocabulary corresponding to the historical time series data; A generating module, configured to generate a dynamic prompt word corresponding to the historical time series data according to the historical time series data and the dynamic word library; A prediction module is used to predict the future time series data corresponding to the target object based on the dynamic prompt word and the prediction model, and the future time series data includes data corresponding to the target object at at least one future time.