Time sequence prediction method and system, computing device and storage medium
By acquiring and analyzing the correlation information between historical timing data and events, combining large language models and user predictions, the problem of insufficient accuracy of existing timing prediction methods is solved, and higher prediction accuracy and interpretability are achieved.
Patent Information
- Application Number
- CN202410088787.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-22
- Publication Date
- 2025-07-22
AI Technical Summary
The existing timing prediction methods are insufficient in many scenarios to meet actual needs.
By obtaining the historical timing data of the prediction object and the event information of multiple historical events, determining their correlation information, and using a large language model for training and prediction, combining user prediction information and inference processes, improving prediction accuracy.
Improve the accuracy and interpretability of timing prediction to ensure the rationality and credibility of the prediction results.
Smart Images

Figure CN120354979A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence (AI) technology, and in particular, to a time series prediction method, system, computing device, and storage medium. Background Art
[0002] Time series prediction refers to establishing a mathematical model based on the past time series (TS) data of the prediction object, and then using this mathematical model to predict the future value of the prediction object. For example, it can predict prediction objects such as stock prices, temperatures, sales volumes, and passenger flows.
[0003] Currently, there are many time series prediction methods, and most methods focus on statistical and machine learning techniques. In recent years, deep learning methods have also been used in the field of time series prediction. The current general time series prediction process is to first collect the historical time series data of the prediction object (i.e., the observed values or measurement results of the prediction object at a series of historical time points), then perform preprocessing and feature engineering on the historical time series data, and then perform model training based on the processed historical time series data, and then use the trained model for time series prediction. Sometimes some additional information is also input into the model. For example, subway line information and weather information will be added for subway passenger flow prediction, and product release information and policy change information will be added for financial prediction. However, in many scenarios, the prediction accuracy of the above models still cannot meet the actual needs. Summary of the Invention
[0004] This application provides a time series prediction method, system, computing device, and storage medium, which can improve the accuracy of time series prediction.
[0005] In a first aspect, this application provides a time series prediction method, which includes: obtaining the historical time series data of the prediction object and the event information of multiple historical events, and obtaining the correlation information between the historical time series data and the multiple historical events, and then predicting the data of the prediction object at the target time based on the historical time series data, the event information of the multiple historical events, and the correlation information to obtain a time series prediction result. Among them, the historical time series data includes the values of the prediction object at multiple historical time points; the event information of each historical event includes an event description and an occurrence time; the correlation information indicates that a first historical event among the multiple historical events has an impact on the value of at least one historical time point in the historical time series data. Optionally, the number of first historical events can be one or more, each first historical event has an impact on the value of the prediction object at one or more historical time points, and the historical time points affected by different first historical events can be exactly the same, partially the same, or completely different, and no specific limitation is made here.
[0006] It can be seen that this solution uses correlation information for time series prediction. Since the correlation information describes the correlation between the above-mentioned multiple historical events and the historical time series data, and quantifies the impact of the events on the time series data, it can improve the accuracy of time series prediction.
[0007] Based on the first aspect, in a possible implementation scheme, the time correspondence between the numerical values of the predicted object at the above multiple historical time points and the above multiple historical events can be determined first, and then the first large language model is trained based on the above historical time series data, the event information of the multiple historical events and the time correspondence, and then the correlation information between the above multiple historical events and the historical time series data is generated through the first large language model. Compared with manually extracting the above correlation information, since this solution uses a large language model to infer the correlation information, the extraction efficiency and effect of the correlation information can be improved.
[0008] Based on the first aspect, in a possible implementation scheme, the above-mentioned historical time series data, event information of multiple historical events and correlation information can be input into the second largest language model, and the second largest language model outputs the time series prediction result. Optionally, the second largest language model and the previous first largest language model can be the same large language model or different large language models. This scheme inputs the correlation information into the second largest language model for time series prediction, which is equivalent to quantifying the impact of external events on the prediction object into the second largest language model, and therefore, can improve the prediction accuracy of the second largest language model.
[0009] Based on the first aspect, in a possible implementation scheme, user prediction information can also be obtained, the user prediction information including the user's first prediction information on the numerical value of the prediction object at the target time and / or the user's second prediction information on events after the above-mentioned multiple historical events. Then, the above-mentioned user prediction information, event information and correlation information of multiple historical events are input into the second largest language model, and then the second largest language model outputs the time series prediction result.
[0010] The above-mentioned user prediction information is actually prediction auxiliary information provided by the user based on his own knowledge and experience. Inputting the user prediction information into the second largest language model is equivalent to integrating the user's knowledge and experience into the time series prediction process, thereby improving the accuracy of time series prediction.
[0011] Based on the first aspect, in a possible implementation, first, the second large language model outputs a first reasoning process corresponding to the time series prediction result. The first reasoning process includes one or more reasoning steps. When receiving an operation in which the user confirms that the first reasoning process is correct, the time series prediction result is generated through the second large language model and the first reasoning process. That is to say, before the second large language model outputs the time series prediction result, the second large language model can be allowed to output the first reasoning process corresponding to the time series prediction result first. The first reasoning process actually explains to the user in the form of natural language the logic of the second large language model's reasoning of the time series prediction result, thereby improving the interpretability and credibility of the time series prediction result.
[0012] Based on the first aspect, in a possible implementation, when receiving an operation in which the user indicates that the first reasoning process is incorrect, the second large language model outputs a second reasoning process corresponding to the time series prediction result. The second reasoning process includes one or more reasoning steps. Then, when receiving an operation in which the user confirms that the second reasoning process is correct, the time series prediction result is generated through the second large language model and the second reasoning steps. That is to say, if the user discovers through review that the first reasoning process output by the second large language model is incorrect, the second large language model can be allowed to output a new reasoning process, that is, the second reasoning process. Subsequently, when the user confirms that the second reasoning process is correct, the second large language model is allowed to output the time series prediction result based on the second reasoning process, thereby ensuring the rationality and accuracy of the time series prediction result.
[0013] Based on the first aspect, in a possible implementation, first, the second large language model outputs a first reasoning step corresponding to the time series prediction result. Then, when receiving an operation in which the user confirms that the first reasoning step is correct, the second large language model and the first reasoning step output a second reasoning step corresponding to the time series prediction result. Subsequently, when receiving an operation in which the user confirms that the second reasoning step is correct, the time series prediction result is generated through the second large language model, the first reasoning step, and the second reasoning step.
[0014] That is to say, in addition to allowing the second large language model to output a complete reasoning process (including one or more reasoning steps) each time, the second large language model can also be allowed to output reasoning steps one by one (not a complete reasoning process, but one step in the reasoning process), so that the user can review the rationality of the reasoning steps one by one. Only when the user confirms that the current reasoning step is correct, will the second large language model be allowed to continue to output the next reasoning step based on the current reasoning step. The next reasoning step also needs to be reviewed by the user... until the second large language model outputs all the reasoning steps and all the reasoning steps have been reviewed / modified, and then the second large language model generates the final time series prediction result based on these reasoning steps, thereby improving the accuracy and interpretability of the time series prediction result.
[0015] Based on the first aspect, in a possible implementation, in addition to indicating that the first historical information has an impact on the values at at least one historical time point in the historical time series data, the relevance information may further indicate the direction of the impact of the first historical event on the values at at least one historical time point in the historical time series data, and the direction of the impact may be positive or negative.
[0016] Based on the first aspect, in a possible implementation, on the basis of indicating the direction of the impact, the relevance information may further indicate the degree of the impact of the first historical event on at least one historical time point in the historical time series data.
[0017] It can be understood that the richer and more detailed the above-mentioned relevance information is, the more accurately it can depict the impact of external events on the value of the prediction object, thereby improving the accuracy of time series prediction.
[0018] In a second aspect, the present application further provides a time series prediction system, including an acquisition module and a prediction module. The acquisition module is used to acquire the historical time series data of the prediction object, and the historical time series data includes the values of the prediction object at multiple historical time points. The acquisition module is further used to acquire the event information of multiple historical events, and the event information of each historical event includes an event description and an occurrence time. The acquisition module is further used to acquire the relevance information between the historical time series data and the multiple historical events, and the relevance information indicates that the first historical event among the multiple historical events has an impact on the values at at least one historical time point in the historical time series data. The prediction module is used to predict the value of the prediction object at the target time based on the historical time series data, the event information of the multiple historical events, and the relevance information, so as to obtain a time series prediction result.
[0019] The above time series prediction system may further include more or fewer units / modules, which are not specifically limited herein. The time series prediction system in the second aspect is specifically used to execute the method in any implementation manner in the first aspect. For details, refer to the foregoing introduction and will not be elaborated herein.
[0020] In a third aspect, the present application further provides a computing device, which includes a processor and a memory. The processor is used to execute the instructions stored in the memory so that the computing device implements the method in any implementation manner in the first aspect.
[0021] In a fourth aspect, the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are run by a computing device or a computing device cluster, the method in any implementation manner in the first aspect can be implemented.
[0022] Fifth aspect, the present application further provides a computing device cluster, including at least one computing device, and each computing device includes a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any implementation manner in the first aspect.
[0023] Sixth aspect, the present application further provides a computer program product including instructions. When the instructions in the computer program product are run on a computing device or a computing device cluster, the computing device or the computing device cluster is caused to execute the method according to any implementation manner in the first aspect. Description of the Drawings
[0024] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for description in the embodiments.
[0025] Figure 1 It is a schematic diagram of a time series prediction scenario provided by an embodiment of the present application;
[0026] Figure 2 It is a schematic flowchart of a time series prediction method provided by an embodiment of the present application;
[0027] Figure 3 It is a schematic diagram of stages of a time series prediction process provided by an embodiment of the present application;
[0028] Figure 4 It is a schematic structural diagram of a computing device provided by an embodiment of the present application. Detailed Embodiments
[0029] The following will describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments provided in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0030] An embodiment of the present application provides a time series prediction system. The system first obtains historical time series data of a prediction object, event information of multiple historical events, and correlation information between the historical time series data and the multiple historical events. Then, the system predicts the value of the prediction object at a target time based on the above-obtained information. Among them, the historical time series data includes the values of the prediction object at the above multiple historical time points; the event information includes an event description and an occurrence time; the correlation information indicates that the first historical event (the number is one or more) among the above multiple historical events has an impact on the value of at least one time point in the historical time series data. It should be understood that since the system combines the correlation information between the historical time series data and the multiple historical events in the time series prediction process, this correlation information describes the correlation relationship between the above multiple historical events and the historical time series data, quantifies the impact of the events on the time series data, and thus can improve the accuracy of time series prediction.
[0031] The time series prediction system 200 will be introduced in detail below.
[0032] Please refer to Figure 1 , Figure 1 FIG. 1 is a schematic diagram of a time series prediction scenario provided by an embodiment of the present application. The scenario includes a client 100 and a time series prediction system 200. Among them, the client 100 is communicatively connected to the time series prediction system 200, which can be a wired connection or a wireless connection. The number of clients 100 communicatively connected to the time series prediction system 200 can be one or more, and the embodiment of the present application does not make a specific limitation.
[0033] The client 100 is used to implement human-computer interaction and can be deployed on a terminal device or a computing device. Among them, the terminal device can be a smart phone, a wearable device, a laptop computer, a tablet computer, a vehicle-mounted device, a smart conference device, or a smart home appliance, etc., and the computing device can be a server, a personal computer (PC), etc. The embodiment of the present application does not make a specific limitation.
[0034] In a specific implementation, the above client 100 can be an application (APP) client running on a mobile terminal such as a smart phone or a wearable device, or a software or application program running on a computing device (such as a PC client), or a web client accessed based on a browser, or a console of a cloud platform. The console can provide a cloud service for time series prediction to users, and users can obtain the usage right of the time series prediction system 200 in the present application by purchasing the cloud service. The embodiment of the present application does not make a specific limitation.
[0035] The time series prediction system 200 is used to provide the function of time series prediction and can be deployed on a computing device, a computing device cluster composed of multiple computing devices, or a terminal device. Among them, the computing device can be a physical server, a virtual machine, a container, or an edge computing device, etc. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. When creating a virtual machine in a computing device, part of the hard disk and memory capacity of the physical machine needs to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent basic input / output system (CMOS), hard disk, and operating system, and the virtual machine can be operated like a physical machine. A container is a portable software unit that can combine an application and all its dependencies into a software package, which is not restricted by the underlying host operating system, so there is no need to build a complex environment, simplifying the process from application development to deployment. An edge computing device refers to a device that is closer to the data source and end user and has the characteristics of low latency and high bandwidth, such as an intelligent router, an edge server, etc. The embodiments of the present application do not make specific limitations. The terminal device can refer to the foregoing content and will not be elaborated here.
[0036] Optionally, the above-mentioned client 100 and time series prediction system 200 can be deployed on the same terminal device or computing device; or, the client 100 is deployed on the terminal device, and the time series prediction system 200 is deployed on the computing device or computing device cluster. It should be understood that the above examples are only for illustration, and the deployment of the client 100 and the time series prediction system 200 can be determined according to the actual application scenario.
[0037] Furthermore, the above-mentioned time series prediction system 200 can be divided into multiple unit modules. Figure 1 An exemplary division method of the time series prediction system 200 is given, including an acquisition module 210, a training module 220, and a prediction module 230. It also includes an information library 300 for storing historical time series data and event information and a model library 400 for storing large language models, which will be introduced separately below.
[0038] 1. Acquisition module 210: Used to acquire the historical time series data of the prediction object and the event information of M historical events.
[0039] The object to be predicted refers to the object for which time series prediction is required. For example, in the field of financial prediction, the object to be predicted can be the price of a certain stock, the exchange rate of a certain currency, etc.; in the field of meteorological prediction, the object to be predicted can be meteorological indicators such as the temperature and rainfall in a certain area; in the field of passenger flow prediction, the object to be predicted can be the passenger flow indicators such as the inbound volume, outbound volume, passenger volume, and transfer volume of a certain passenger station (such as a subway station / railway station / bus station / coach station, etc.); in the field of market prediction, the object to be predicted can be the sales volume, sales amount, inventory, etc. of a certain type of product. Regarding the field to which the object to be predicted belongs and its specific type, the embodiments of the present application do not make any limitations, and can be selected according to the prediction requirements of the actual application scenario.
[0040] The historical time series data of the object to be predicted includes the values of the object to be predicted at K historical time points. Wherein, K is a positive integer greater than 1, and the embodiments of the present application do not make specific limitations on the value of K.
[0041] The historical time point refers to a past time point. The number of historical time points can be multiple, and the intervals between multiple historical time points can be equal or unequal. The embodiments of the present application do not make specific limitations on this, and can be set according to the needs of the actual application scenario. The value of the object to be predicted at a historical time point refers to the actual value of the object to be predicted at that historical time point, and this value can be obtained through measurement / sampling and other methods. For example, assuming that the object to be predicted is the price of a certain stock, then the value of the object to be predicted at a historical time point can be the actual price of this stock at that historical time point.
[0042] Obtaining the historical time series data of the object to be predicted is actually obtaining the values of the object to be predicted at K historical time points. Continuing with the example where the object to be predicted is the price of a certain stock, the price of the stock can be recorded according to each historical time point (each historical time point is set at a certain interval, such as one hour / one day / one week, etc.), and the prices of the stock at each historical time point are arranged in chronological order to observe and understand the change of the stock price, so as to obtain the historical time series data of the stock price. Then, the user can send the historical time series data to the acquisition module 210 in the time series prediction system 200 through the client 100. Regarding the above-mentioned interval and the number of historical time points, the embodiments of the present application do not make specific limitations. Of course, in addition to recording at a fixed interval, it can also be recorded at an unfixed interval. Optionally, the acquisition module 210 can also perform data preprocessing on the values of the object to be predicted at each historical time point. The data preprocessing can be operations such as missing value filling, outlier processing, format / unit conversion, data normalization, etc. The embodiments of the present application do not make specific limitations.
[0043] A historical event refers to an event that occurred in the past. The number of historical events can be M, where M is a positive integer greater than 1. The embodiments of the present application do not specifically limit the value of M. The event information of a historical event includes the event description and the occurrence time of the historical event. The event description of a historical event refers to the description of the event content / process of the historical event, which can be a detailed event description, such as a detailed description of the process and details of the historical event, or a brief event description, such as a simple overview of the key points of the event. The occurrence time of a historical event refers to the specific time when the historical event occurred, which can be a period of time (involving multiple moments) or a moment. Optionally, in addition to the event description and the occurrence time, the event information of a historical event may further include at least one of the information such as the occurrence location, participants, event result, information source, etc.
[0044] In different fields, the event information of different historical events can be recorded. For example, in the field of financial forecasting, historical events such as economic policy changes, economic data releases, major contract signings, product launches, raw material price changes, etc. can be recorded; in the field of passenger flow forecasting, historical events such as concerts, sports events, song and dance shows, book signings, theme light shows, exhibitions, weather changes, etc. can be recorded; in the field of market forecasting, historical events such as raw material price adjustments, promotional activities, import and export policy changes, advertising placements, etc. can be recorded. It can be understood that the above types of historical events are only examples and do not constitute specific limitations. In actual applications, other historical events can also be recorded, and the embodiments of the present application do not make specific limitations.
[0045] Optionally, the event information of historical events can be recorded manually. For example, business personnel in a certain field record the event information of each historical event that occurred in that field according to cycles such as days / weeks / months, and then the business personnel send the events of the historical events to the acquisition module 210 of the time series forecasting system 200 through the client 100; the acquisition module 210 can also automatically record the event information of each historical event that occurred in a field, or multiple historical events can be manually entered into the acquisition module 210 in the time series forecasting system 200 first, and then the acquisition module 210 analyzes, refines, and summarizes the detailed information of each historical event to obtain the event information of multiple historical events in that field.
[0046] Optionally, the acquisition module 210 can use large language models (LLMs), term frequency-inverse document frequency (TF-IDF) techniques, deep learning methods, etc. to refine the event information of each historical event in order to improve the efficiency of obtaining event information.
[0047] A large language model refers to a natural language processing model with a large number of parameters and learning capabilities. During training, large language models use a vast amount of text data and are capable of understanding and generating natural language text. For example, the acquisition module 210 first obtains the detailed information of multiple historical events in a certain field input by the user, and then the acquisition module 210 inputs the detailed information of each historical event into a large language model (which can be located inside the model library 400 in Figure 1 ), and instructs the large language model to refine and summarize the detailed information of each historical event. Subsequently, the large language model outputs the event information of each historical event.
[0048] TF-IDF is a text analysis and feature extraction technique commonly used in natural language processing and information retrieval to measure the importance of a word in a document. In some possible embodiments of the present application, the user can send the document data of one or more historical events (describing the detailed information of each historical event) to the time series prediction system 200 through the client 100. Then, the time series prediction system 200 extracts the keywords (i.e., words with higher importance) in the document data of each historical event through the TF-IDF technique, and then constructs the event information of each historical event based on the extracted keywords.
[0049] Deep learning is an important branch in the field of machine learning. It simulates the information processing process of the human brain through multi-layer artificial neural networks, and can achieve efficient processing and learning capabilities for large-scale data. In some possible embodiments of this application, the time series prediction system 200 can use the document sample data of a large number of historical events in a certain field to train a deep learning model, so that the deep learning model has a good understanding and processing ability for the document data of historical events in this field, and can correctly classify the document data of historical events. Regarding the specific type of the deep learning model here, the embodiments of this application do not make any limitations. For example, the deep learning model can adopt network structures such as recurrent neutral network (RNN), convolutional neural network (CNN), long short-term memory (LSTM), and Transformer network. Regarding the classification labels of the deep learning model, the embodiments of this application do not make specific limitations either, and can be set and adjusted according to the actual application scenario. For example, for the field of passenger flow prediction, various types of event labels (such as sports event labels, cultural and entertainment event labels, bad weather event labels, etc.) can be set for the deep learning model. Subsequently, the user can send the document data of one or more historical events to the time series prediction system 200 through the client 100. The time series prediction system 200 classifies the document data of each historical event based on the previously trained deep learning model, and then constitutes the event information of each historical event based on the classification results of each historical event.
[0050] Optionally, the obtaining module 210 can store the obtained historical time series data and the event information of M historical events in the information repository 300. The information repository 300 can be a database or a knowledge base, and can be deployed on one or more storage devices. The embodiments of this application do not make specific limitations on the type of the storage device. In the case where the information repository 300 is deployed on multiple storage devices, a part of the information in the information repository 300 can be stored in one storage device, and another part of the information can be stored in other storage devices.
[0051] Optionally, a time series data table can be created in the information repository 300, and the time series data table is used to store the historical time series data of the prediction object. The fields in the time series data table include a time field and a numerical field. Among them, the time field is used to record historical time points (which can be represented in formats such as timestamps or date and time), and the numerical field is used to store the numerical values of the prediction object at the corresponding historical time points. In addition, the time series data table can also include more fields, and the embodiments of this application do not make specific limitations.
[0052] For example, assume that a prediction object in the field of market prediction is the sales volume of a certain product. Table 1 shows a time-series data table of the sales volume of this product. The fields in this table include a time field and a numerical field. Each row represents the value of the prediction object at a historical time point, and different rows represent the values of the prediction object at different historical time points.
[0053] Table 1 Time-Series Data Table of the Sales Volume of a Certain Product
[0054] Time field (timestamp format) Numeric field (representing sales amount) 1625309020948 1500 1625309021533 1650 1625309022573 1700
[0055] Again, assume that a prediction object in the field of passenger flow prediction is the outbound volume of a certain subway station. Table 2 shows a time-series data table of the outbound volume of this subway station. The fields in this table include a time field and a numerical field. Each row represents the value of the prediction object at a historical time point, and different rows represent the values of the prediction object at different historical time points.
[0056] Table 2 Time-Series Data Table of the Outbound Volume of a Certain Subway Station
[0057] Time field (date-time format) Numeric field (representing outbound volume) 2023-10-15-17:00 50 2023-10-15-17:30 80 2023-10-15-18:00 150 2023-10-15-18:30 220
[0058] Optionally, an event table can be created in the information repository 300. The fields in the event table include an event identifier (ID) field, an event description field, and an occurrence time field (which can be represented in formats such as timestamps or date and time). Among them, the event ID field is used to record the event ID of historical events, the event description field is used to record the event descriptions of corresponding historical events, and the occurrence time field is used to record the occurrence times of corresponding historical events. Further, the event table can also include at least one of the fields such as occurrence location, participants, event results, information sources, etc., which are not specifically limited in the embodiments of the present application.
[0059] For example, Table 3 shows an event table in the field of market prediction, which is used to record the event information of some historical events related to the field of market prediction. Specifically, this event table includes fields such as an event ID field, an event description field, and an occurrence time field. Among them, the event ID field is used to uniquely identify a historical event; the event description field is used to record the event descriptions of each historical event. For example, the event description of the historical event with event ID 0001 is "The raw material price increased by 10%", and the event description of the historical event with event ID 0002 is "XXX promotion activity"; the occurrence time field is used to record the occurrence times of each historical event. For example, the occurrence time of the historical event with event ID 0001 is 2021-3-15, and the occurrence time of the historical event with event ID 0002 is 2021-6-10.
[0060] Table 3 An Event Table in the Field of Market Prediction
[0061] Event ID Event description Occurrence time 0001 Raw material prices increase by 10% 2021-3-15 0002 XXX promotion activity 2021-6-10 0003 Changes in import and export policies 2021-7-5 0004 Star endorsement advertisement goes live 2021-8-18
[0062] For another example, Table 4 shows an event table in the field of passenger flow prediction. This event table is used to record the event information of some historical events related to the field of passenger flow prediction. Specifically, this event table includes fields such as event ID, event description, occurrence time, and occurrence location. Among them, the event ID field is used to uniquely identify a historical event; the event description field is used to record the event descriptions of each historical event, the occurrence time field is used to record the occurrence time of each historical event, and the occurrence location field is used to record the occurrence location of each historical event. For example, for the historical event with event ID Event001, the event description of this historical data recorded in Table 4 is "XX concert", the occurrence time is 2023-10-15-18:00~20:30, and the occurrence location is Stadium A; for the historical event with event ID Event002, the event description of this historical event recorded in Table 3 is "XX basketball game", the occurrence time is 2023-10-15-17:00~19:00, and the occurrence location is Stadium B.
[0063] Table 4 An event table in the field of passenger flow prediction
[0064] Event ID Event description Occurrence time Occurrence location Event001 XX concert 2023-10-15-18:00~20:30 Stadium A Event002 XX basketball game 2023-10-15-17:00~19:00 Stadium B Event003 XX art exhibition 2023-10-15-10:00~21:00 XX Cultural Center Event004 XX concert 2023-10-15-18:00~20:00 XX Concert Hall Event005 Orange rainstorm warning 2023-10-15-16:00~20:00 XX urban area Event006 Section construction causes XX bus line to suspend operation 2023-10-15-14:00~17:00 XX Road
[0065] 2. Training module 220: Used to train the large language model.
[0066] Specifically, the acquisition module 210 first acquires the historical time series data of the prediction object and the event information of M historical events, and then stores the above-mentioned content obtained into the information library 300, thereby obtaining the preliminary information library 300. Then, the training module 220 constructs a training data set based on the above-mentioned content in the information library 300. The training data set is used to fine-tune the first large language model. The first large language model is a certain large language model in the model library 400. Regarding the type of the first large language model, the embodiments of the present application do not make specific limitations. For example, a pre-trained generative transformer (Generative Pre-trained Transformer, GPT), a chat generative pre-trained language model (Chat Generative Pre-trained Language Model, ChatGLM), etc. that are suitable for processing time series data can be used. Optionally, the model library 400 can be deployed on one or more storage devices. The model library 400 and the information library 300 can be deployed on the same storage device or on different storage devices. The embodiments of the present application do not make specific limitations. The fine-tuning of the first large language model will be introduced in detail below.
[0067] First, determine the time correspondence between the historical time-series data of the prediction object and M historical events. It should be understood that the historical time-series data includes the values at K historical time points, and the event information of each historical event includes the occurrence time of the historical event (which may involve one or more historical time points). By comparing the above K historical time points with the occurrence times of the M historical events, the historical events related to the same time point are corresponded to the values of the prediction object, so as to determine the time correspondence between the above historical time-series data and the M historical events. Optionally, the training module 220 can determine the above time correspondence according to the historical time-series data of the prediction object and the time-series information of M historical time points in the information library 300 by itself, or the user can determine the above time correspondence by himself, and then send the historical time-series data of the prediction object, the event information of the M historical events, and the above time correspondence to the acquisition module 210 of the time-series prediction system 200 through the client 100. Then, the acquisition module 210 stores the above obtained content in the information library 300. Furthermore, the training module 220 can directly obtain the time correspondence from the information library 300 for training the first large language model.
[0068] For example, assume that a prediction object in the field of market prediction is the sales volume of a certain product. The historical time-series data of the prediction object includes: the value of the prediction object at the historical time point 2022-10-5-11:00 is 5000, and the value of the prediction object at the historical time point 2022-10-5-13:00 is 6800. The occurrence time of historical event A in the field of market prediction is 2022-10-5-10:00 to 12:00, and the occurrence time of historical event B in the field of market prediction is 2022-10-5-13:00 to 14:00. By comparing the occurrence times of the above historical events with the historical time points corresponding to the respective values of the prediction object, the training module 220 can determine the following time correspondence: historical event A corresponds to the value 5000 of the prediction object at 2022-10-5-11:00, and historical event B corresponds to the value 6800 of the prediction object at 2022-10-5-13:00.
[0069] Then, the training module 220 inputs the historical time-series data of the prediction object, the event information of the M historical events, and the above time correspondence into the first large language model for training (model fine-tuning), so that the first large language model learns the time correspondence between the historical time-series data and the M historical events.
[0070] It should be understood that after the above model fine-tuning is completed, the first large language model has a better understanding ability for the time series data of the prediction object and the events in the field where the prediction object is located. At this time, the relevance information between the historical time series data of the prediction object and the M historical events can be inferred by using the first large language model. The relevance information indicates that the first historical event has an impact on the values of at least one historical time point in the historical time series data. The number of the first historical events can be one or more. When the number of the first historical events is more than one, the relevance information respectively indicates which / which of the K historical time points the value of the prediction object is affected by each first historical event, that is, each first historical event will have an impact on the values of the prediction object at one or more historical time points. The historical time points affected by different first historical events may be exactly the same, partially the same, or completely different.
[0071] It should be noted that the impact of a historical event on the value of the prediction object at a certain time point may be a positive impact or a negative impact. A positive impact means that the historical event causes an increase in the value of the prediction object at this time point. If this historical event did not occur, the value of the prediction object at this time point would be lower. A negative impact means that the historical event causes a decrease in the value of the prediction object at this time point. If this historical event did not occur, the value of the prediction object at this time point would be higher. The same historical event may affect the values of the prediction object at one or more time points, and the value of the prediction object at a certain time point may also be affected by one or more historical events.
[0072] Optionally, the relevance information also indicates the impact direction of the first historical event on the values of at least one historical time point in the historical time series data, and the impact direction can be positive or negative. That is to say, on the basis of indicating that the first historical event has an impact on the values of one or more historical time points in the historical time series data, the relevance information can further indicate the impact direction of the first historical event on the values of these historical time points respectively. For a certain first historical event, assuming that the relevance information indicates that the first historical event has an impact on the values of i historical time points in the historical time series data, at this time the relevance information can further indicate the impact direction of the first historical event on the values of j historical time points in the historical time series data, and the j historical events here can be part or all of the above i historical time points.
[0073] As described above, the number of first historical events can be one or more. When the number of first historical events is more than one, the relevance information can specifically indicate the impact direction of each of all the first historical events on one or more historical time points, or the relevance information can also only specifically indicate the impact direction of each of some of the first historical events on one or more historical time points.
[0074] The same historical event may only bring a positive impact / negative impact. For example, in the field of market prediction, a certain historical event caused a decrease in the product sales volume at multiple historical time points, that is, a negative impact, but this historical event did not have a positive impact on the product sales volume at other historical time points. Another example is in the field of passenger flow prediction. A certain historical event caused an increase in the passenger flow at one or more historical time points, that is, a positive impact, but this historical event did not have a negative impact on the passenger flow at other historical time points.
[0075] The same historical event may bring both a positive impact and a negative impact, that is, a historical event has a positive impact on the values of the prediction object at some historical time points, and has a negative impact on the values of the prediction object at other historical time points. For example, assume that a prediction object in the field of market prediction is the monthly sales volume of a certain product. The promotion event caused a significant increase in the monthly sales volume of this product in the month when the promotion event was held, that is, a positive impact. However, due to a large number of consumers waiting for this promotion event, there was a phenomenon of delayed consumption, resulting in a decrease in the monthly sales volume in the month before this promotion event compared with the previous months, that is, a negative impact.
[0076] Optionally, the relevance information also indicates the degree of impact of the first historical event on the values of at least one historical time point in the historical time series data. The degree of impact can be expressed in percentage or other forms, and the embodiments of the present application do not make specific limitations. That is to say, on the basis of indicating the impact direction of the first historical event on the values of one or more historical time points in the historical time series data, the relevance information can further indicate the degree of impact of the first historical event on the values of these historical time points respectively. For a certain first historical event, assume that the relevance information indicates the impact direction of this first historical event on the values of p historical time points in the historical time series data. At this time, the relevance information can further indicate the degree of impact of this first historical event on the values of q historical time points in the historical time series data. Here, the q historical events can be some or all of the above p historical time points.
[0077] As described above, the number of first historical events can be one or more. When the number of first historical events is more than one, the relevance information can specifically indicate the degree of influence of each first historical event among all the first historical events on the values of the prediction object at one or more historical time points.
[0078] Optionally, the above-mentioned relevance information can be stored in Figure 1 the time series data table or event table in the information repository 300, or can also be stored in other locations in the information repository 300 other than the time series data table and the event table.
[0079] Continuing with the examples in Table 1 and Table 3, assuming that a prediction object in the field of market prediction is the sales volume of a certain product, relevant fields can be added on the basis of Table 3 above to obtain Table 5. Among them, the relevant field indicates the historical time point corresponding to the historical event (i.e., the historical time point of influence), and then the table 1 can be queried according to this historical time point to determine the value of the historical time point affected by the historical event in the historical time series data. Further, an influence direction field and an influence degree field can also be added to Table 5. The influence direction field indicates the influence direction of the historical event on the value of the prediction object at the corresponding historical time point, and the influence degree field indicates the influence degree of the historical event on the value of the prediction object at the corresponding historical time point.
[0080] As shown in Table 5, for the historical event with event ID 0001, the event description corresponding to this historical event recorded in Table 5 is "raw material price drops by 10%", the occurrence time is "2021-3-15", the relevant field is "1625309020948", the influence direction is "negative", and the influence degree is "20%". The relevant field records a timestamp 1625309020948. By querying the time field in Table 1 according to this timestamp and finding the same timestamp, the value of the prediction object at this timestamp (representing a historical time point) can be determined. At this time, it can be determined that this historical event has a 20% negative influence on the value of the prediction object at the historical time point represented by 1625309020948.
[0081] Similarly, as shown in Table 5, for the historical event with event ID 0002, the event description corresponding to this historical event recorded in Table 5 is "XXX Promotion Activity", the occurrence time is "2021-6-10", the correlation fields include "1625309020948" and "1625309021533", the influence direction is "positive", and the influence degrees are "30%" and "20%". The above correlation fields record two timestamps, "1625309020948" and "1625309021533". By querying the time field in Table 1 according to these two timestamps respectively, the same timestamps are found, and then the values of the prediction object at these two timestamps (representing a historical time point) can be determined. At this time, it can be determined that this historical event has a 30% positive influence on the value of the prediction object at the historical time point represented by 1625309020948, and this historical event has a 20% positive influence on the value of the prediction object at the historical time point represented by 1625309021533.
[0082] The analysis of other historical events in Table 5 is similar and will not be introduced in detail here.
[0083] Table 5 An event table with correlation fields in the field of market prediction
[0084]
[0085] Continuing with the examples in Table 2 and Table 4, assuming that a prediction object in the field of passenger flow prediction is the outbound volume of a certain subway station, then correlation fields can be added on the basis of Table 4 in the front to obtain Table 6. Among them, the correlation fields indicate the historical time points corresponding to the historical events (i.e., the historical time points of influence), and then the values of the historical time points affected by this historical event in the historical time series data can be determined by querying Table 2 according to this historical time point. Further, an influence direction field can also be added to Table 6, and the influence direction field indicates the influence direction of the historical event on the value of the prediction object at the corresponding historical time point.
[0086] Table 6 An event table with correlation fields in the field of passenger flow prediction
[0087]
[0088] As shown in Table 6, for this historical event with event ID Event001, the event description corresponding to this historical event recorded in Table 6 is "XX Concert", the occurrence time is "2023-10-15-18:00~20:30", the correlation fields include "2023-10-15-17:00" and "2023-10-15-17:30", and the impact direction is "positive". The above correlation fields record two date and time values, "2023-10-15-17:00" and "2023-10-15-17:30". By querying the time fields in Table 2 according to these two date and time values respectively, the same date and time can be found, and then the values of the prediction object at these two date and time points (representing a historical time point) can be determined. At this time, it can be determined that this historical event has a positive impact on the value of the prediction object at the historical time point represented by "2023-10-15-17:00", and this historical event has a positive impact on the value of the prediction object at the historical time point represented by "2023-10-15-17:30".
[0089] The analysis of other historical events in Table 6 is similar and will not be introduced in detail here.
[0090] Optionally, the time series prediction system 200 can directly store the above correlation information output by the first large language model in the information library 300, or first send the correlation information output by the first large language model to the client 100 so that the user can verify the correlation information on the client 100, that is, a user verification link is introduced to ensure the rationality of the correlation information extracted by the first large language model. Then, when receiving the operation indicating that the correlation information is reasonable by the user (i.e., the user verification is passed), the time series prediction system 200 stores the correlation information in the information library 300.
[0091] For example, after the first large language model outputs correlation information through reasoning, the time series prediction system 200 can send the correlation information to the client 100, and then the client 100 displays the correlation information to the user so that the user can verify whether the correlation information is reasonable. Regarding the way the client 100 displays the correlation information to the user, the embodiments of the present application do not make specific limitations. For example, the correlation information can be displayed to the user in the form of text or charts on the interaction interface.
[0092] If the user determines that the correlation information output by the first large language model is reasonable, the user can perform an operation indicating that the correlation information is reasonable on the client 100 (the embodiments of the present application do not limit the specific operation method). Subsequently, the client 100 sends the information of this operation to the time series prediction system 200, and the time series prediction system 200 confirms that the user verification is passed according to the information of this operation, and then stores the correlation information in the information library 300.
[0093] If the user determines that the relevance information output by the first large language model is unreasonable, the user can perform an operation indicating the error of the relevance information on the client 100. Subsequently, the client 100 sends the information of this operation to the time series prediction system 200. The time series prediction system 200 determines that the user verification fails based on the information of this operation, and then indicates to the first large language model that the relevance information is incorrect, and asks the first large language model to generate new relevance information. The new relevance information also needs to be verified by the user (the user verification method is similar)... until the user indicates that the currently output relevance information of the first large language model is reasonable. At this time, the time series prediction system 200 will store the relevance information passed by the user verification in the information library 300. It should be understood that by introducing the above user verification link, the reasonableness of the relevance information extracted by the first large language model can be ensured, and then storing the relevance information passed by the user verification in the information library 300 helps to improve the prediction accuracy of subsequent time series prediction.
[0094] Optionally, the information library 300 can also be updated. It should be understood that as time goes by, more and more events will occur in a field. Therefore, the acquisition module 210 can continue to collect the event information of other events except the above M historical events in the manner described above, and can also collect the values (time series data) of the prediction object at other time points except the above K historical time points in the manner described above, and then store the above information in the information library 300, so as to realize the (regular / periodic) update of the information library 300. Similarly, the acquisition module 210 can also obtain the relevance information between the newly collected historical events and time series data in the manner described above, and then store the relevance information in the information library 300, so as to realize the update of the information library 300.
[0095] Optionally, in addition to generating the above relevance information with the help of a large language model (see the specific description above), the relevance information can also be analyzed and sorted out manually, and then the relevance information is stored in the information library 300. It should be understood that when the amount of information of historical time series data and event information is large, it will be difficult to analyze and sort out the relevance information manually, and it will take a long time, and it is also easy to make editing errors or miss some relevance information. Compared with the manual method, obtaining relevance information based on a large language model is more efficient, has a better effect, and is not easy to make mistakes.
[0096] 3. Prediction module 230: used to perform time series prediction tasks and output time series prediction results.
[0097] Specifically, when the user needs to predict the value of the prediction object at the target time, the user can input a task description to the client 100, and this task description indicates that the value of the prediction object at the target time is to be predicted. Herein, the target time can be a time point or a period of time (involving multiple time points), and the embodiments of the present application do not make specific limitations. Correspondingly, the client 100 receives the task description input by the user and sends the task description to the prediction module 230 in the time series prediction system 200. Then, according to this task description, the prediction module 230 obtains the historical time series data of the prediction object, the event information of M historical events, and the correlation information from the information library 300, generates a task prompt based on the above-obtained content and the task description, and then inputs the task prompt into the second large language model in the model library 400, so as to enable the second large language model to output the predicted value of the value of the prediction object at the target time, that is, the time series prediction result.
[0098] It should be understood that the second large language model is a certain large language model in the model library 400. Regarding the type of the second large language model, the embodiments of the present application do not make specific limitations. For example, large language models suitable for processing time series data such as GPT, ChatGLM, and LLAMa can be used. Inputting the above correlation information into the second large language model during the time series prediction process is equivalent to quantifying the influence of external events on the prediction object into the second large language model, so the prediction accuracy of the second large language model can be improved.
[0099] Optionally, the second large language model and the first large language model described above can be the same large language model. That is to say, the training module 220 first fine-tunes a large language model based on the historical time series data of the prediction object and the event information of M historical events, and then uses this large language model to output the correlation information between the historical time series data and the M historical events. Then, in the time series prediction stage, the prediction module 230 constructs a task prompt based on the above historical time series data, the event information of M historical events, and the correlation information, and inputs the task prompt into the same large language model, so that the large language model outputs the time series prediction result.
[0100] The second large language model and the first large language module can also be different large language models. That is to say, the training module 220 first fine-tunes the first large language model based on the historical time series data of the prediction object and the event information of M historical events, and then uses the first large language model to output the correlation information between the historical time series data and the M historical events. Then, in the time series prediction stage, the prediction module 230 constructs a task prompt based on the above historical time series data, the event information of M historical events, and the correlation information, and inputs the task prompt into another large language model, that is, the second large language model, so that the second large language model outputs the time series prediction result.
[0101] Optionally, user's pre-judgment information (i.e., prediction auxiliary information provided by the user) can also be combined in the above time series prediction process to improve the accuracy of time series prediction. Specifically, the client 100 obtains the user's pre-judgment information input by the user. The user's pre-judgment information includes the first pre-judgment information of the user on the value of the prediction object at the target time and / or the second pre-judgment information of the user on the event after M historical events. Then, the client 100 sends the user's pre-judgment information to the prediction module 230 in the time series prediction system 200. Next, the prediction module 230 inputs the above user's pre-judgment information, the historical time series data of the prediction object, the event information of M historical events, and the correlation information into the second large language model, and the second large language model outputs the time series prediction result.
[0102] Among them, the first pre-judgment information refers to the relevant pre-judgment of the user on the value of the prediction object at the target time based on the user's own knowledge and experience. For example, the user can analyze the development direction / trend of the prediction object based on the current value of the prediction object and some current events / historical events, combined with the user's own experience, so as to give the user's pre-judgment on the specific value of the prediction object at the target time, obtain the first pre-judgment information, and then input the first pre-judgment information into the client 100. Subsequently, the client 100 sends the first pre-judgment information to the prediction module 230 in the time series prediction system 200 for time series prediction. Another example is that the user can not pre-judge the specific value, but give the pre-judgment on the value range / change direction (positive or negative) / change degree (increase rate or decrease ratio) of the value of the prediction object at the target time, obtain the first pre-judgment information, and then input the first pre-judgment information into the client 100. The client 100 then sends the first pre-judgment information to the time series prediction system 200 for time series prediction.
[0103] The second prediction information refers to the user's prediction regarding the events after M historical events based on their own knowledge and experience, that is, the prediction of what events may occur in the future (which can be one or more events). Optionally, the second prediction information may include prediction information such as the event description and occurrence time of the event, and may also include prediction information such as the number of events and the event type. The embodiments of the present application do not make specific limitations. For example, assuming the prediction object is the price of a certain stock, the user can, based on their experience, predict the specific price of the stock at the target time to obtain the first prediction information, and then input the first prediction information into the client 100. Subsequently, the client 100 sends the first prediction information to the prediction module 230 in the time series prediction system 200, and then the prediction module 230 inputs the above first prediction information into the second large language model for time series prediction. Another example, assuming the prediction object is the sales volume of a certain product, and the target time is 2024-6-18-20:00, the user, based on their experience, predicts that there will be a promotional event at the target time. The user can use the event description and occurrence time of the promotional event as the second prediction information, and then input the second prediction information into the client 100. Subsequently, the client 100 sends the second prediction information to the prediction module 230 in the time series prediction system 200, and then the prediction module 230 inputs the above second prediction information into the second large language model for time series prediction.
[0104] It should be understood that the embodiments of the present application input the user's prediction information as part of the task prompt word into the second large language model, which is equivalent to integrating the user's knowledge and experience in the time series prediction process, making the time series prediction result output by the second large language model more accurate.
[0105] Optionally, in the above time series prediction process, the event information between the M historical events can also be combined to improve the accuracy of time series prediction. Specifically, the acquisition module 210 acquires the event relationship between the M historical events and stores the event relationship in the information database 300. Then, the prediction module 230 inputs the historical time series data, the event information of the M historical events, the correlation information, and the event relationship in the information database 300 into the second large language model. Here, the user's prediction information can also be input into the second large language model, or the user's prediction information may not be input. Subsequently, the second large language model outputs the time series prediction result.
[0106] Among them, the event relationship includes at least one of relationships such as the sequence relationship, causal relationship, and influence direction relationship.
[0107] The order of precedence relationship indicates the order of precedence between different historical events, and the order of precedence relationship can be determined according to the time of occurrence of different historical events. For example, the order of precedence between historical event A and historical event B among M historical events is: historical event A→historical event B. For another example, the order of precedence between historical event C, historical event D, and historical event E among M historical events is: historical event C→historical event D→historical event E.
[0108] Causal relationships indicate that one historical event is the cause / result of another historical event, and this causal relationship can be determined based on the event descriptions of different historical events. For example, in the field of market forecasting, the disclosure of new technologies leads to a reduction in raw material prices, and the reduction in raw material prices leads to a reduction in finished product prices, that is, the new technology disclosure event is the cause of the raw material price reduction event, and the raw material price reduction event is the cause of the finished product price reduction event. For another example, in the field of passenger flow forecasting, the construction of a certain road causes the suspension of buses passing through the road, that is, the road construction event is the cause of the bus suspension event.
[0109] The influence direction relationship indicates the direction of influence of one event on another event, which can be positive or negative. For example, in the field of passenger flow forecasting, the transportation management department considers that exhibition activities will attract a large number of viewers, so it increases the number of transport vehicles, that is, the exhibition event has a positive impact on the increase in the number of transport vehicles event. For another example, in the field of market forecasting, the event of rising raw material prices has a positive impact on the event of rising finished product prices, while the event of rising raw material prices has a negative impact on the event of falling finished product prices.
[0110] The above-mentioned event relationship can be extracted by a large language model, a thing map or other technical means, and the embodiments of the present application are not specifically limited. Among them, the thing map is a knowledge map for representing and storing the relationship between entities and events. It is a structured data model for describing various events, entities and the associations between them in the real world. The construction of a thing map usually involves natural language processing and knowledge graph technology. First, the information of entities and events is extracted from a large amount of text data, and then the information is converted into a structured form through semantic parsing and relationship extraction technology to build the association relationship between entities and events.
[0111] Optionally, before the second large language model outputs the time series prediction result, the second large language model can first output the first inference process (including one or more inference steps) corresponding to the time series prediction result to improve the interpretability of the time series prediction result. Then, the time series prediction system 200 sends the first inference process to the client 100, and the client 100 displays the first inference process to the user. When the client 100 receives the operation of the user confirming that the first inference process is correct, the client 100 sends the information of this operation to the prediction module 230 in the time series prediction system 200. Then, according to the information of this operation, the prediction module 230 instructs the second large language model to generate a time series prediction result based on the first inference process. When the client 100 receives the operation of the user indicating that the first inference process is incorrect, the client 100 sends the information of this operation to the prediction module 230 in the time series prediction system 200. Then, the prediction module 230 indicates to the second large language model that the first inference process is incorrect and instructs the second large language model to generate a new inference process.
[0112] It should be understood that the inference process explains to the user in natural language the logic of the second large language model's inference of the time series prediction result. Optionally, the inference process may include one or more of the following: whether an event (historical event or user-predicted event) affects the value of the prediction object at the target time (abbreviated as the target value), whether the event has a positive or negative impact on the target value, the degree of impact of the event on the target value, and the role played by the user's prediction information in the inference of the second large language model, that is, how the user's prediction information affects the model's decision-making process.
[0113] Regarding the number and content of the inference steps in the inference process, the embodiments of the present application do not make specific limitations. For example, in the first inference step, the second large language model can explain to the user which event(s) will affect the target value and which event(s) will not affect the target value. Then, in the second inference step, the second large language model can further explain which event(s) have a positive impact on the target value and which event(s) have a negative impact on the target value. That is, the first inference step and the second inference step constitute an inference process for the second large language model to infer the time series prediction result. Another example is that in the first inference step, the second large language model can explain to the user which event(s) will affect the target value and which event(s) will not affect the target value. Then, in the second inference step, the second large language model can further explain which event(s) have a positive impact on the target value and which event(s) have a negative impact on the target value. Next, in the third inference step, the second large language model can explain the degree of impact of each event on the target value. That is, the first inference step, the second inference step, and the third inference step constitute an inference process for the second large language model to infer the time series prediction result.
[0114] The embodiments of the present application do not specifically limit the manner in which a user indicates an error in an inference process.
[0115] For example, the time series prediction system 200 sends the first inference result output by the second large language model to the client 100, and the client 100 presents the first inference result to the user. Subsequently, the user can only indicate the error in the first inference process (including one or more inference steps) on the client 100, but does not specifically point out the error location (such as which inference step is incorrect / which sentence is incorrect) and the modification opinion. Then, the client 100 sends the above indication of the user to the prediction module 230 in the time series prediction system 200. At this time, the prediction module 230 can only indicate to the second large language model that the first inference process is incorrect, and cannot specifically indicate the error location and the modification opinion to the second large language model. At this time, the second large language model can only output a new inference process by itself, and then continue to present the new inference process to the user for review in the manner described above.
[0116] Again, for example, the time series prediction system 200 sends the first inference result output by the second large language model to the client 100, and the client 100 presents the first inference result to the user. Subsequently, the user can specifically point out the error in the first inference process and give a modification opinion, indicating how one or more inference steps in the first inference process should be specifically modified. Then, the prediction module 230 inputs the modification opinion of the user into the second large language model and instructs the second large language model to generate a new inference process / modify the current inference process based on the modification opinion, and then continue to present the new inference process to the user for review in the manner described above..... until the user confirms that the current inference process is correct. At this time, the prediction module 230 can instruct the second large language model to output a time series prediction result according to the current inference process. The prediction module 230 can also send the time series prediction result to the client 100, and then the client 100 presents the time series prediction result to the user. The present application does not specifically limit the presentation manner.
[0117] Again, for example, assume that in a certain inference step output by the second large language model, it is indicated that event A has a positive impact on the value of the prediction object at the target time (denoted as the target value), and it is not indicated in this inference step that event B has an impact on the target value. However, based on the user's experience, the user believes that event B will also have a positive impact on the target value. Then, the user can give a modification opinion, indicating that the second large language model should supplement "event B has a positive impact on the target value" to this inference process, so as to complete the modification of this inference process.
[0118] Optionally, the second largest language model can output all the reasoning steps in an inference process for the user to verify. The second largest language model can also output the reasoning steps step by step for the user to verify whether each reasoning step is correct one by one. When the client 100 receives the operation of the user confirming that the current reasoning step is correct, the client 100 sends the information of the above operation to the prediction module 230, and then the prediction module 230 instructs the second largest language model to output the next reasoning step according to the information of the operation. When the client 100 receives the operation of the user indicating that the current reasoning step is incorrect, the client 100 sends the information of the above operation to the prediction module 230, and then the prediction module 230 instructs the second language model to modify the current reasoning step according to the information of the operation, and then continue to output the next reasoning step based on the modified current reasoning step. Until the second largest language model outputs all the reasoning steps and all the reasoning steps are verified by the user, the prediction module 230 instructs the second largest language model to generate a time series prediction result according to all the reasoning steps verified by the user. Subsequently, the time series prediction result is sent to the client 100 for display to the user.
[0119] It should be noted that Figure 1 the time series prediction system 200 is only divided into the acquisition module 210, the training module 220 and the prediction module 230 exemplarily according to functions. In fact, Figure 1 the time series prediction system 200 in Figure 1 may further include more or fewer modules. For example, a certain module above can be split into multiple functional modules, or two or more modules above can be combined into one functional module, or other functional modules can be added to Figure 1 the time series prediction system 200 in this application. The embodiments of the present application do not make specific limitations. Figure 1 The information library 300 and the model library 400 in
[0120] As an example of a software functional unit, the prediction module 230 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above computing instance may be one or more. For example, the prediction module 230 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers for running the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers for running the code may be distributed in the same availability zone (AZ) or in different AZs, and each AZ includes one data center or multiple geographically proximate data centers. Usually, one region may include multiple AZs. Similarly, the multiple hosts / virtual machines / containers for running the code may be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, one VPC is set within one region. For cross-region communication between two VPCs within the same region and between VPCs in different regions, a communication gateway needs to be set in each VPC, and the interconnection between VPCs is achieved through the communication gateway.
[0121] As an example of a hardware functional unit, the prediction module 230 may include at least one computing device, such as a server. Alternatively, the prediction module 230 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0122] The multiple computing devices included in the prediction module 230 can be distributed in the same region or in different regions. The multiple computing devices included in the prediction module 230 can be distributed in the same availability zone (AZ) or in different AZs. Similarly, the multiple computing devices included in the prediction module 230 can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Among them, the multiple computing devices can be any combination of computing devices such as servers, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), and generic array logic (GALs).
[0123] Based on Figure 1 the time series prediction system 200, the embodiments of the time series prediction method provided in this application are introduced below.
[0124] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a time series prediction method provided in an embodiment of this application, including steps S201 to S204.
[0125] S201. Obtain the historical time series data of the prediction object, where the historical time series data includes the values of the prediction object at K historical time points.
[0126] Among them, K is a positive integer greater than 1, and no specific limitation is made in the embodiments of this application. Optionally, the historical time series data is stored in the time series data table of the prediction object, and the fields in the time series data table include a time field and a value field. For the type of the prediction object and other content of the historical time series data, please refer to Figure 1 the relevant description, which will not be elaborated here.
[0127] S202. Obtain the event information of M historical events, where the event information of each historical event includes an event description and an occurrence time.
[0128] Among them, M is a positive integer greater than 1, and no specific limitation is made in the embodiments of this application.
[0129] Optionally, the event information of each historical event may further include at least one of information such as an occurrence location, a participant, an event result, and an information source. For other content of the event information, please refer to Figure 1 the relevant description, which will not be elaborated here. Optionally, the event information of M historical events is stored in an event table, and the fields in the event table include an event identifier field, an event description field, and an occurrence time field. For other content of the event table, please refer to Figure 1 the relevant introduction, which will not be elaborated here.
[0130] It should be noted that the embodiments of the present application do not specifically limit the execution order of steps S201 and S202. For example, step S201 can be executed first and then S202, or step S202 can be executed first and then S201, or steps S201 and S202 can be executed in parallel.
[0131] S203. Obtain the correlation information between the historical time series data and M historical events, where the correlation information indicates that the first historical event among the M historical events has an impact on the values of at least one historical time point in the historical time series data.
[0132] Optionally, the number of the first historical events can be one or more. When the number of the first historical events is multiple, these multiple first historical events can be some or all of the above M historical events.
[0133] Optionally, the correlation information also indicates the impact direction of the first historical event on the values of at least one time point in the historical time series data, and the impact direction is positive or negative. Optionally, on the basis of indicating the impact direction, the above correlation information also indicates the impact degree of the first historical event on the values of at least one time point in the historical time series data.
[0134] Optionally, the correlation information between the historical time series data and M historical events can be obtained through at least one of the following methods:
[0135] Method 1. Analyze and extract the correlation information between the historical time series data and M historical events manually.
[0136] Method 2. First determine the time correspondence relationship between the values of the prediction object at K historical time points (i.e., the historical time series data) and M historical events, then train the first large language model according to the historical time series data, the event information of M historical events, and the above time correspondence relationship, and then perform model inference through the first large language model to output the above correlation information. For the relevant description of the first large language model, please refer to Figure 1 the relevant description, which will not be elaborated here.
[0137] It should be understood that compared with Method 1, Method 2 does not require manual participation in the extraction of correlation information, which saves more manpower and time, and can also avoid errors in manual extraction and editing. Moreover, for some correlation information between historical events and historical time series data that is difficult to discover manually, it can be more easily extracted with the help of a large language model, which simplifies the extraction process and can also improve the accuracy of subsequent time series prediction.
[0138] S204. Predict the value of the prediction object at the target time based on the historical time series data, the event information of M historical events, and the correlation information to obtain the time series prediction result.
[0139] The target time can be a time point or a period of time (involving multiple time points), which is not specifically limited in the embodiments of the present application. Optionally, the historical time series data, the event information of M historical events and the correlation information can be input into the second largest language model, and the second largest language model outputs the time series prediction result. Figure 1 The relevant description is not repeated here.
[0140] Optionally, user prediction information can be obtained, including the user's first prediction information on the value of the predicted object at the target time and / or the user's second prediction information on the event after M historical events, and then the user prediction information, historical time series data, event information and correlation information of M historical events are input into the second largest language model, and the second largest language model outputs the time series prediction result. For the first prediction information and the second prediction information, please also refer to Figure 1 It should be understood that the embodiment of the present application inputs the user's prediction information as part of the task prompt word into the second largest language model, which is equivalent to integrating the user's knowledge and experience in the time series prediction process, thereby making the time series prediction result output by the second largest language model more accurate.
[0141] Optionally, the event relationship between the M historical events can be obtained, and then the event relationship can also be input into the second language model for time series prediction, thereby improving the accuracy of time series prediction. For event relationships, please refer to the previous introduction, which will not be repeated here.
[0142] Optionally, to improve the interpretability of the time series prediction results, before outputting the time series prediction results, the second largest language model may be allowed to output the reasoning process corresponding to the time series prediction results, and the reasoning process is to explain to the user the logic of the time series prediction results inferred by the second largest language model in natural language form. The manner in which the second largest language model outputs the reasoning process may include the following implementation modes 1 and 2.
[0143] In the first implementation mode, the second largest language model is used to output the first reasoning process (including one or more reasoning steps) corresponding to the timing prediction result. When the user confirms that the first reasoning process is correct, the second largest language model is used to generate the timing prediction result according to the first reasoning process. When the user indicates that the first reasoning process is wrong, the second largest language model is used to output the second reasoning process corresponding to the timing prediction result. The second reasoning process includes one or more reasoning steps. Subsequently, when the user confirms that the second reasoning process is correct, the second largest language model is used to generate the timing prediction result according to the second reasoning process.
[0144] That is to say, in this embodiment, the second large language model first outputs the reasoning process. Only when the user confirms that the reasoning process output by the model is correct, the model is allowed to generate the final time series prediction result. If the user indicates that the reasoning process / reasoning steps output by the model are incorrect (the indication method can refer to the relevant introduction above), the second large language model can be allowed to generate a new reasoning process according to the user's indication, and then let the user confirm whether the new reasoning process is incorrect. It should be understood that this method introduces the user's review of the reasoning process output by the model. On the one hand, it can ensure that the reasoning logic is reasonable, so as to obtain an accurate time series prediction result. On the other hand, it can help the user understand the reasoning logic / working principle of the model, improve the credibility of the second large language model and the interpretability of the time series prediction result.
[0145] Embodiment 2: Let the second large language model output the reasoning steps one by one. Correspondingly, the user reviews the rationality of the reasoning steps one by one. When the user confirms that the current reasoning step is correct, let the second large language model continue to output the next reasoning step based on this reasoning step, and the user continues to review. When the user indicates that the current reasoning step is incorrect, the second large language model generates a new reasoning step / modifies the current reasoning step according to the user's indication. Subsequently, the second large language model continues to output the next reasoning step based on the modified current reasoning step, and the user continues to review. Until the second large language model outputs the last reasoning step, and the last reasoning step is reviewed and passed / modified by the user, and then the second large language model generates the time series prediction result based on all the reasoning steps (all reviewed and passed or corrected by the user).
[0146] For example, assume that the reasoning process includes the first reasoning step and the second reasoning step. The second large language model first generates the first reasoning step corresponding to the time series prediction result. After receiving the operation of the user confirming that the first reasoning step is correct, the second large language model continues to generate the second reasoning step corresponding to the time series prediction result based on the first reasoning step. Then, after receiving the operation of the user confirming that the second reasoning step is correct, the second large language model generates the time series prediction result according to the first reasoning step and the second reasoning step.
[0147] Next, in combination with Figure 3 , for Figure 2 the time series prediction method provided, a specific example will be given.
[0148] Please refer to Figure 3 , Figure 3 which is a schematic diagram of the stages of a time series prediction process provided by an embodiment of the present application, including the following stages ① to ④.
[0149] ① The stage of constructing the information library 300
[0150] First, obtain the event information of M historical events and the historical time-series data of the prediction object. Here, M is a positive integer greater than 1, and the embodiments of this application do not make specific limitations. The event information of historical events related to the field of the prediction object can be obtained according to the field of the prediction object. The event information includes information such as event descriptions and occurred events. The historical time-series data includes the values of the prediction object at K historical time points, where K is a positive integer greater than 1, and the embodiments of this application do not make specific limitations either.
[0151] Then, determine the time correspondence between the historical time-series data and the M historical events. Regarding the method for obtaining this time correspondence, reference can be made to Figure 1 the relevant introduction, which will not be elaborated here.
[0152] Next, construct the information library 300. It should be understood that here, a preliminary information library 300 is constructed based on the event information of the above M historical events, the historical time-series data, and the time correspondence. There is temporarily no correlation information between the historical time-series data and the M historical events in the information library 300, and the correlation information will be obtained in Phase ②. Optionally, a time-series data table can be created in the information library 300, and then the historical time-series data of the prediction object can be stored in this time-series data table, and the time correspondence can also be stored in the time-series data table; an event table can also be created in the information library 300, and then the event information of the M historical events can be stored in this event table. Regarding other contents of the above time-series data table, event table, and information library 300, please refer to Figure 1 the relevant introduction, which will not be elaborated here.
[0153] ② Large language model fine-tuning phase
[0154] First, construct a training dataset based on the information library 300. The training dataset includes multiple pieces of training data, and each piece of training data includes the event information of a historical event, the value of the prediction object at a historical time point, and the time correspondence between this historical event and the value of the prediction object at this historical time point.
[0155] Then, fine-tune the large language model with the training dataset. Specifically, input the training dataset into a large language model (such as Figure 1 the first large language model in the model library 400), so that the large language model learns the time correspondence between the above historical time-series data and the M historical events, thereby having a better understanding ability of the time-series data of the prediction object and the events in the field where the prediction object is located.
[0156] ③ Obtaining correlation information phase
[0157] First, the large language model outputs the correlation information between the historical time-series data and the M historical events.
[0158] Then, the user confirms whether the relevance information is reasonable. In the case where the user determines that the relevance information output by the large language model is unreasonable, the large language model is made to re-output the relevance information, that is, generate new relevance information, and then the user is made to confirm the reasonableness of the new relevance information. In the case where the user determines that the current relevance information is reasonable, the relevance information is input into the information repository 300. It should be understood that at this time, the information repository 300 stores historical time series data, event information of M historical events, and the above-mentioned relevance information, and the information repository 300 is basically constructed and can thus be used for time series prediction in stage ④.
[0159] ④ Step-by-step generation of inference steps and time series prediction result generation stage
[0160] First, generate a task prompt. Specifically, based on the content in the information repository 300 constructed in stage ③ (including historical time series data of the prediction object, event information of M historical events, and relevance information), the task description input by the user, and the user's pre-judgment information (as optional information), a task prompt is generated. Among them, the task description is a description of a specific prediction task, used to instruct the large language model to predict the value of a certain prediction object at the target time. The user's pre-judgment information is the pre-judgment made by the user based on their own knowledge and experience. The user's pre-judgment information includes first pre-judgment information and / or second pre-judgment information. The first pre-judgment information is the pre-judgment information of the user regarding the value of the prediction object at the target time, and the second pre-judgment information is the pre-judgment information of the user regarding the events after the M historical events.
[0161] Then, input the task prompt into the large language model (such as Figure 1 the second large language model in the model library 400), and the large language model gradually generates inference steps.
[0162] Subsequently, the user determines whether the current inference step is correct. If the current inference step is correct, the large language model proceeds to the inference of the next step based on the current inference step, thereby generating the content of the next inference step. The next inference step also needs to be judged by the user for its correctness, which will not be elaborated here. If the user indicates that the current inference step generated by the large language model is incorrect, then modify the current inference step based on the modification opinion input by the user. After modification, the large language model then proceeds to the inference of the next step based on the current inference step and continues to generate the content of the next inference step. The next inference step also needs to be judged by the user for its correctness, which will not be elaborated here.
[0163] The large language model gradually outputs inference steps in the above-mentioned manner, and each inference step is judged by the user for its correctness. Until all inference steps are completed, the large language model generates a time series prediction result based on all inference steps (all reviewed / modified by the user), thereby completing the time series prediction process.
[0164] In summary, in the time series prediction method provided in the embodiment of the present application, the value of the predicted object at the target time is predicted based on the historical time series data of the predicted object, the event information of multiple historical events, and the correlation information between the historical time series data and multiple historical events to obtain the time series prediction result. Since the correlation information describes the correlation between the above multiple historical events and the historical time series data, the impact of the event on the time series data is quantified, so the accuracy of the time series prediction can be improved.
[0165] In addition to performing time series prediction based on the above information, time series prediction can also be further performed in combination with user prediction information. It should be understood that performing time series prediction based on user prediction information is equivalent to integrating user knowledge and experience in the time series prediction process, thereby making the time series prediction result more accurate.
[0166] In order to improve the interpretability of the time series prediction results, the reasoning process corresponding to the time series prediction results can be output before the time series prediction results are generated. After the user confirms that the reasoning process is correct, the time series prediction results are generated based on the reasoning process. The reasoning process can be output at one time for user review, or each reasoning step in the reasoning process can be output step by step. The user reviews the reasoning steps one by one to ensure the rationality of each reasoning step. After all reasoning steps are reviewed and approved by the user, the time series prediction results are generated based on all reasoning steps, thereby improving the accuracy and credibility of the time series prediction results.
[0167] Based on the above, the following describes the Figure 2 A computing device for a time series prediction method.
[0168] See also Figure 4 , Figure 4 4 is a schematic diagram of the structure of a computing device 400 provided in an embodiment of the present application, and the computing device 400 may be the time series prediction system 200 described above. The computing device 400 includes a processor 401, a storage unit 402, a storage medium 403, and a communication interface 404, wherein the processor 401, the storage unit 402, the storage medium 403, and the communication interface 404 communicate through a bus 405, and also communicate through other means such as wireless transmission, which is not specifically limited in the embodiment of the present application.
[0169] The processor 401 is composed of one or more general-purpose processors, such as a central processing unit (CPU), a neural network processing unit (NPU), or a combination of a CPU and a hardware chip. The above-mentioned hardware chip is an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC), or any combination thereof. The processor 401 executes various types of digital storage instructions, such as software or firmware programs stored in the storage unit 402, which enables the computing device 400 to provide a wide variety of services.
[0170] In a specific implementation, as an embodiment, the processor 401 includes one or more CPUs, such as Figure 4 CPU0 and CPU1 shown in
[0171] In a specific implementation, as an embodiment, the computing device 400 includes multiple processors, such as Figure 4 the processor 401 and the processor 406 shown in
[0172] Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, the processor refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0172] The storage unit 402 is used to store program code and is controlled by the processor 401 to execute the steps in the above-mentioned Figure 2 time series prediction method. The program code includes one or more software units. The above-mentioned one or more software units can be Figure 1 the acquisition module 210, the training module 220, and the prediction module 230 in the embodiment, which are jointly used to implement Figure 2 the time series prediction method of the embodiment.
[0173] The storage unit 402 includes a read-only memory and a random access memory, and provides instructions and data to the processor 401. The storage unit 402 also includes a non-volatile random access memory. The storage unit 402 is a volatile memory or a non-volatile memory, or includes both volatile and non-volatile memories. Among them, the non-volatile memory is a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory is a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are used, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). It can also be a hard disk, a USB flash drive, a flash memory, an SD card, a memory stick, etc. The hard disk can be a hard disk drive (HDD), a solid state disk (SSD), a mechanical hard disk (HDD), etc. The present application does not make specific limitations.
[0174] The storage medium 403 is a carrier for storing data, such as a hard disk, a USB flash drive (universal serial bus, USB), a flash memory, an SD card (secure digital memory Card, SD card), a memory stick, etc. The hard disk can be a hard disk drive (HDD), a solid state disk (SSD), a mechanical hard disk (HDD), etc. This application does not make specific limitations.
[0175] The communication interface 404 is a wired interface (such as an Ethernet interface), an internal interface (such as a Peripheral Component Interconnect express (PCIe) bus interface), a wired interface (such as an Ethernet interface), or a wireless interface (such as a cellular network interface or a wireless local area network interface), and is used to communicate with other servers or units.
[0176] The bus 405 is a Peripheral Component Interconnect Express (PCIe) bus, or an Extended Industry Standard Architecture (EISA) bus, a unified bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. The bus 405 is divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 405 also includes a power bus, a control bus, a status signal bus, etc. However, for the sake of clear illustration, all kinds of buses are labeled as the bus 405 in the figure.
[0177] The embodiment of this application also provides a computing device cluster, which can be the time series prediction system 200 in the foregoing content. The computing device cluster includes at least one computing device 400. Instructions for performing the Figure 2 time series prediction method may be stored in the storage unit 402 of one or more computing devices 400 in the computing device cluster, which may be the same or different.
[0178] Embodiments of the present application also provide a computer program product. The computer program product may be software or a program product that contains instructions and can run on a computing device 400 or be stored in any available medium. When the computer program product runs on at least one computing device 400, it causes the at least one computing device 400 to execute Figure 2 the timing prediction method.
[0179] Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by the computing device 400, or a data storage device such as a data center that contains one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive), etc. The computer-readable storage medium includes instructions that can instruct the computing device 400 to execute Figure 2 the timing prediction method.
[0180] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes a plurality of computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions according to the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A time series prediction method, characterized in that, The method comprises: Acquire historical time series data of a prediction object, wherein the historical time series data includes values of the prediction object at multiple historical time points; Obtaining event information of multiple historical events, where the event information of each historical event includes an event description and an occurrence time; Acquire correlation information between the historical time series data and the multiple historical events, the correlation information indicating that a first historical event among the multiple historical events has an impact on a value of at least one historical time point in the historical time series data; Based on the historical time series data, the event information of the multiple historical events and the correlation information, the value of the prediction object at the target time is predicted to obtain a time series prediction result.
2. The method according to claim 1, wherein The obtaining of the correlation information between the historical time series data and the plurality of historical events includes: Determine the time correspondence between the values of the predicted object at the multiple historical time points and the multiple historical events; Training a first language model based on the historical time series data, the event information of the plurality of historical events, and the time correspondence; The relevance information is generated by using the first language model.
3. The method according to claim 1 or 2, characterized in that, The step of predicting the value of the prediction object at the target time based on the historical time series data, the event information of the multiple historical events and the correlation information to obtain a time series prediction result includes: The historical time series data, the event information of the multiple historical events and the correlation information are input into a second largest language model, and the second largest language model outputs the time series prediction result.
4. The method according to claim 3, characterized in that, The method further includes: acquiring user prediction information, the user prediction information including first prediction information of the user on the value of the predicted object at the target time and / or second prediction information of the user on an event after the multiple historical events; The inputting the historical time series data, the event information of the multiple historical events and the correlation information into the second large language model includes: inputting the historical time series data, the event information of the multiple historical events, the correlation information and the user prediction information into the second large language model.
5. The method according to claim 3 or 4, characterized in that, The second largest language model outputs the time series prediction result, including: Outputting a first reasoning process corresponding to the time series prediction result through the second largest language model, where the first reasoning process includes one or more reasoning steps; When receiving an operation from the user confirming that the first reasoning process is correct, the time series prediction result is generated by using the second large language model and the first reasoning process.
6. The method according to claim 5, wherein The method further comprises: When receiving an operation from a user indicating that the first reasoning process is wrong, outputting a second reasoning process corresponding to the time series prediction result through the second large language model, where the second reasoning process includes one or more reasoning steps; When receiving an operation from the user confirming that the second reasoning process is correct, the time series prediction result is generated through the second large language model and the second reasoning step.
7. The method according to claim 3 or 4, characterized in that, The second largest language model outputs the time series prediction result, including: Outputting a first reasoning step corresponding to the time series prediction result through the second largest language model; When receiving an operation from the user confirming that the first reasoning step is correct, outputting a second reasoning step corresponding to the time series prediction result through the second large language model and the first reasoning step; When receiving an operation from the user confirming that the second reasoning step is correct, the time series prediction result is generated through the second large language model, the first reasoning step and the second reasoning step.
8. The method according to any one of claims 1 to 7, characterized in that, The correlation information further indicates the direction of influence of the first historical event on the value of at least one historical time point in the historical time series data, and the direction of influence is positive or negative.
9. The method according to claim 8, wherein The correlation information also indicates the degree of influence of the first historical event on the numerical value of at least one historical time point in the historical time series data.
10. The method according to any one of claims 1 to 9, characterized in that The historical time series data is stored in the time series data table of the prediction object, the fields in the time series data table include a time field and a value field, the event information of the multiple historical events is stored in the event table, and the fields in the event table include an event identification field, an event description field and an occurrence time field.
11. A time series prediction system, characterized in that, Including acquisition module and prediction module, The acquisition module is used to acquire historical time series data of the prediction object, and the historical time series data includes values of the prediction object at multiple historical time points; The acquisition module is also used to acquire event information of multiple historical events, and the event information of each historical event includes an event description and an occurrence time; The acquisition module is further used to acquire correlation information between the historical time series data and the multiple historical events, wherein the correlation information indicates that a first historical event among the multiple historical events has an impact on a value of at least one historical time point in the historical time series data; The prediction module is used to predict the value of the prediction object at the target time based on the historical time series data, the event information of the multiple historical events and the correlation information to obtain a time series prediction result.
12. The system according to claim 11, wherein The system further comprises a training module, wherein the training module is configured to: Determine the time correspondence between the values of the predicted object at the multiple historical time points and the multiple historical events; Training a first language model based on the historical time series data, the event information of the plurality of historical events, and the time correspondence; The relevance information is generated by using the first language model.
13. The system according to claim 11 or 12, wherein The prediction module is specifically used for: The historical time series data, the event information of the multiple historical events and the correlation information are input into a second largest language model, and the second largest language model outputs the time series prediction result.
14. The system according to claim 13, wherein The acquisition module is further used to: acquire user prediction information, the user prediction information including first prediction information of the user on the value of the predicted object at the target time and / or second prediction information of the user on events after the multiple historical events; The prediction module is specifically used to: input the historical time series data, the event information of the multiple historical events, the correlation information and the user prediction information into the second largest language model.
15. The system according to claim 13 or 14, characterized in that, The prediction module is specifically used for: Output the first inference process corresponding to the time series prediction result through the second large language model, where the first inference process includes one or more inference steps; In the case of receiving an operation by the user to confirm that the first inference process is correct, generate the time series prediction result through the second large language model and the first inference process.
16. The system according to claim 15, wherein, The prediction module is specifically configured to: In the case of receiving an operation by the user indicating that the first inference process is incorrect, output the second inference process corresponding to the time series prediction result through the second large language model, where the second inference process includes one or more inference steps; In the case of receiving an operation by the user to confirm that the second inference process is correct, generate the time series prediction result through the second large language model and the second inference steps.
17. The system according to claim 13 or 14, characterized in that, The prediction module is specifically configured to: Output the first inference step corresponding to the time series prediction result through the second large language model; In the case of receiving an operation by the user to confirm that the first inference step is correct, output the second inference step corresponding to the time series prediction result through the second large language model and the first inference step; In the case of receiving an operation by the user to confirm that the second inference step is correct, generate the time series prediction result through the second large language model, the first inference step, and the second inference step.
18. The system according to any one of claims 11 to 17, characterized in that, The relevance information also indicates the influence direction of the first historical event on the values of at least one historical time point in the historical time series data, and the influence direction is positive or negative.
19. The system according to claim 18, wherein The relevance information also indicates the influence degree of the first historical event on the values of at least one historical time point in the historical time series data.
20. The system according to any one of claims 11 to 19, characterized in that, The historical time series data is stored in the time series data table of the prediction object. The fields in the time series data table include a time field and a value field. The event information of the multiple historical events is stored in an event table, and the fields in the event table include an event identification field, an event description field, and an occurrence time field.
21. A computing device, characterized in that, It includes a processor and a memory. The processor is configured to execute the instructions stored in the memory so that the computing device implements the method according to any one of claims 1 to 10.
22. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium. When the instructions are run by a computing device, the computing device implements the method according to any one of claims 1 to 10.