A method, device and medium for prediction using a time series model
By adaptively determining the window size and regression coefficient in the time series model, combining user interaction data and historical evaluation, the time series prediction model is optimized, solving the problem of low prediction accuracy caused by artificial settings of window size, and improving the accuracy of market sales forecasts and the effectiveness of marketing strategies.
Patent Information
- Application Number
- CN202411105852.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-08-13
AI Technical Summary
The selection of window size in existing time series models mainly depends on experience or artificial settings, and is easily affected by subjective factors, resulting in low accuracy of prediction results.
By obtaining market sales data, interactive evaluation data and text data during the interactive Q&A process of language model users, analyzing the similar characteristics and distribution of text data, combining the interactive evaluation characteristics of historical data, adaptively determine the window size and regression coefficient of the information verification domain, and optimizing the time series prediction model.
Adaptive determination of time series prediction model parameters is realized, the accuracy of prediction results is improved, user needs and market changes can be better reflected, and marketing strategies with more reference value are provided.
Smart Images

Figure CN118643804B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information interaction data processing, and particularly relates to a method, device and medium for prediction using a time series model. Background Art
[0002] A time series is a set of data at different time points collected at constant time intervals, and these sets are analyzed to understand long-term development trends and for future prediction. A time series model can be used to predict the future development of time series data. The predictive analysis method of time series is widely used in aspects such as national economic macro-control, regional comprehensive development planning, enterprise operation and investment management, market potential prediction, meteorological forecasting, hydrological forecasting, earthquake precursor forecasting, crop pest and disease forecasting, environmental pollution control, ecological balance, astronomy, and oceanography.
[0003] Common time series prediction models include the ARMA model and the ARIMA model. In time series prediction models, the regression coefficient and the time window are relatively important model parameters. In the prior art, the selection of the window size in a time series model is usually set according to experience or manually, which is easily affected by subjective factors, resulting in a low accuracy of the prediction results of the time series model. Summary of the Invention
[0004] In order to solve the technical problem that the selection of the window size in the time series model of the existing method is usually set according to experience or manually, which is easily affected by subjective factors, resulting in a low accuracy of the prediction results of the time series model, the purpose of the present invention is to provide a method, device and medium for prediction using a time series model, and the specific technical solutions adopted are as follows:
[0005] In a first aspect, the present invention provides a method for prediction using a time series model, and the method includes:
[0006] During the interactive Q&A process of the language model user, obtain the market sales data at the current moment, the interactive evaluation data of each user for the interactive Q&A process at the current moment, and the text data of each interactive Q&A;
[0007] According to the data similarity feature distribution between adjacent key information and the distribution of the text data volume in the text data of each interactive Q&A at the current moment, obtain the text coefficient of the information verification domain at the current moment;
[0008] Combine the interactive evaluation data in the historical data to analyze the feature distribution of the corresponding interactive evaluation data of all users at the current moment, and obtain the evaluation coefficient of the information verification domain at the current moment; combine the text coefficient and the evaluation coefficient to determine the window size of the information verification domain at the current moment;
[0009] The window size of the information verification field is used to set the time window size in the time series prediction model, and the evaluation coefficient of the information verification field is used to set the regression coefficient in the time series prediction model; the time series prediction model is used to obtain the prediction result of the market sales data.
[0010] Preferably, obtaining the text coefficient of the information verification field at the current moment according to the data similarity feature distribution and the text data volume distribution between adjacent key information in the text data of each interactive Q&A at the current moment specifically includes:
[0011] Extract keywords from the text data of each interactive Q&A at the current moment respectively, and obtain the word vectors of each keyword;
[0012] For the text data of any one interactive Q&A, obtain the information verification proportion of the text data according to the data similarity feature between the word vectors of adjacent keywords in the text data and the text data volume distribution between adjacent keywords;
[0013] Determine the text coefficient of the information verification field at the current moment based on the overall level of the information verification proportion of the text data of each interactive Q&A at the current moment.
[0014] Preferably, obtaining the information verification proportion of the text data according to the data similarity feature between the word vectors of adjacent keywords in the text data and the text data volume distribution between adjacent keywords specifically includes:
[0015] Based on the similarity between the word vectors of every two adjacent keywords in the text data, determine the similar information factor between every two adjacent keywords; based on the data volume between the position distributions of every two adjacent keywords in the text data, determine the distance information factor between every two adjacent keywords;
[0016] Fuse the similar information factors and distance information factors between all two adjacent keywords in the text data to obtain the information verification proportion of the text data, and both the similar information factor and the distance information factor are positively correlated with the information verification proportion.
[0017] Preferably, combining the interactive evaluation data in the historical data to analyze the feature distribution of the interactive evaluation data of all users at the current moment, and obtaining the evaluation coefficient of the information verification field at the current moment specifically includes:
[0018] Based on the negative correlation coefficient of the interactive evaluation data corresponding to each user at the current moment, determine the Q&A feature factor of each user; obtain the Q&A feature factor of each user at a preset number of historical moments before the current moment;
[0019] Based on the feature distribution of the Q&A feature factors of all users at the current moment and the feature distribution of the Q&A feature factors of all users at all historical moments, the evaluation coefficient of the information verification field at the current moment is obtained.
[0020] Preferably, the obtaining of the evaluation coefficient of the information verification field at the current moment according to the feature distribution of the Q&A feature factors of all users at the current moment and the feature distribution of the Q&A feature factors of all users at all historical moments specifically includes:
[0021] Based on the mean values of the Q&A feature factors of all users at the current moment and all historical moments and the mean value of the Q&A feature factors of all users at the current moment, the evaluation coefficient of the information verification field at the current moment is determined.
[0022] Preferably, the determining of the window size of the information verification field at the current moment by combining the text coefficient and the evaluation coefficient specifically includes:
[0023] The text coefficient and the evaluation coefficient of the information verification field at the current moment are fused to determine an adjustment coefficient, and the value range of the adjustment coefficient is (0, 2); the initial size preset for the text data information verification field is adjusted by using the adjustment coefficient to obtain the window size of the information verification field at the current moment.
[0024] Preferably, the market sales data at the current moment includes the sales volume of commodities in the market at the current moment; the interactive evaluation data includes the evaluation scores of each user for the interactive Q&A process.
[0025] In a second aspect, the present invention provides a device for prediction using a time series model, the device includes a memory and a processor, wherein: the memory is used for storing program codes; the processor is used for reading the program codes stored in the memory and executing the method for prediction using a time series model.
[0026] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored; the computer program is executed by a processor to implement a method for prediction using a time series model.
[0027] The embodiments of the present invention at least have the following beneficial effects:
[0028] The present invention first collects various data during the interactive Q&A process of the model, including interactive evaluation data and text data, providing a data basis for subsequent analysis of evaluation feedback results and text information feature distributions respectively. At the same time, it obtains market sales data among colleagues, providing a data basis for subsequent data prediction. Then, it analyzes the similarity feature distribution of adjacent keywords in the text data during the interactive Q&A process to obtain a text coefficient, and uses the text coefficient to conduct similarity feature analysis from the aspect of text information, representing the weight coefficient of the proportion of the information verification domain range size. Further, when analyzing the feature distribution of the interactive evaluation data, historical data is combined to obtain an evaluation coefficient, and the necessity degree of model update and iteration is reflected through the interactive evaluation feedback, thereby representing the proportion situation of the information verification domain range size from the aspect of user interaction feedback. Secondly, the proportion situations in the two aspects of the information verification domain range size are combined to achieve the self-adaptive determination of the window size of the information verification domain. Finally, the window size of the information verification domain is used to set the time window size in the time series prediction model, and the evaluation coefficient of the information verification domain is used to set the regression coefficient in the time series prediction model, realizing the self-adaptive determination of the time series prediction model parameters, being able to determine a more appropriate window size of the time series prediction model, and making the prediction result of the time series prediction model more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0030] Figure 1 is a flowchart of the steps of a method for predicting using a time series model provided by the present invention;
[0031] Figure 2 is a flowchart of the steps of a method for obtaining a text coefficient provided by the present invention;
[0032] Figure 3 is a sub-step flowchart of step S300 provided by the present invention;
[0033] Figure 4 is a system block diagram of a system for predicting using a time series model provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following specifically describes, with reference to the accompanying drawings and preferred embodiments, a method, device, and medium for prediction using a time series model according to the present invention, including its specific implementation manner, structure, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0036] The following specifically describes the specific solutions of a method, device, and medium for prediction using a time series model provided by the present invention with reference to the accompanying drawings.
[0037] Please refer to Figure 1 , which shows a flowchart of the steps of a method for prediction using a time series model provided by an embodiment of the present invention. The method includes the following steps:
[0038] Step S100, during the interactive Q&A process of the language model user, obtain the market sales data at the current moment, the interactive evaluation data of each user on the interactive Q&A process at the current moment, and the text data of each interactive Q&A.
[0039] The purpose of this embodiment is to analyze the context information of the text data in the interactive Q&A process between the user and the model, perform information verification of the synthetic data and evaluation feedback optimization of the Q&A results, and combine the data analysis results in the information verification process to guide the prediction process of the sales trend of market commodities, adaptively determine the size of the information verification domain, and update and iterate the prediction results in real time to obtain a more accurate prediction trend of market information and determine the model function with constructive decision-making suggestions. In order to provide data support and sources for the subsequent optimization of the model by analyzing the key content, keywords, etc. of the text information, it is first necessary to obtain the text information data of the model during the user interaction process and the historical data when predicting the sales trend of market commodities.
[0040] Specifically, during the interactive Q&A process between the user and the language model, the market sales data of market commodities at the current moment is obtained in real time, including the sales volume of commodities in the market at the current moment, that is, the number of commodities that have been sold for the commodities that the user wants to invest in at the current moment. Then, during the interactive Q&A process between the user and the language model, the text data of each interactive Q&A at the current moment is obtained. It should be noted that there may be multiple users having an interactive Q&A process at the current moment for the interactive Q&A operation of the model. Therefore, it is necessary to obtain the complete text data established for each interactive Q&A corresponding to each user at the current moment.
[0041] Further, user evaluation feedback is introduced into the model to increase the reference of the interactive aspect of model verification, making the allocation of the verification domain more accurate. A question-and-answer interface for users is established in the model, and a scoring system for interactive question-and-answer is established. Users can score the current interactive question-and-answer process. In this embodiment, the interactive evaluation data includes the evaluation scores of each user for the interactive question-and-answer process. That is, the evaluation scores of each user for the interactive question-and-answer process at the current moment are obtained as the interactive evaluation data at the current moment. Among them, the value range of the evaluation score is an integer from 0 to 10. The smaller the value, the lower the satisfaction degree of the user with the current interactive question-and-answer process, and the larger the value, the higher the satisfaction degree of the user with the current interactive question-and-answer process. In other embodiments, the implementer can set according to the specific implementation scenario. For example, the evaluation score can also be set as an integer from 0 to 100.
[0042] Since in the current scenario, generating the marketing strategy of the customer needs to be analyzed in combination with certain historical data, it is necessary to predict and analyze the sales data of the market commodities concerned by the customer in combination with the historical data before the current moment, and update and iterate the information verification domain of the main information window of the text according to the evaluation results of the users, so as to obtain the corresponding optimized result of the marketing strategy. And, in order to prevent errors caused by the randomness of the data or the unreasonable allocation of the text information verification domain in the prediction result, a user evaluation feedback logic is introduced, and corresponding iterative updates are made according to the evaluation results, and then the final model optimization result is obtained.
[0043] That is to say, it should be noted that the synthetic data verification process and the data prediction process of the model in this embodiment are carried out in real time. In order to accurately obtain the data prediction result to provide a better marketing strategy, this embodiment also combines historical data for feature analysis. Therefore, it is necessary to obtain the market sales data at each historical moment, the interactive evaluation data of each user for the interactive question-and-answer process, and the text data of each interactive question-and-answer within a historical time period before the current moment. The data acquisition method at the historical moment is the same as the data acquisition methods at the current moment. The time length of the historical time period can be one quarter, that is, three months, and the time interval between two adjacent moments is 1 day. In other embodiments, the implementer can set according to the specific implementation scenario.
[0044] It should be further noted that the model in this embodiment is used for the question-and-answer interaction of users who want to obtain marketing suggestions. Therefore, the market sales data of the commodity needs to be obtained on the premise of conforming to relevant industry regulations and business privacy. For example, users can predict the commodity data of their own company or enterprise through the question-and-answer interaction process of the model to obtain suggestions and strategies on whether further cooperation can be carried out.
[0045] Step S200, according to the data similarity feature distribution and the distribution of the text data volume between adjacent key information in the text data of each interactive Q&A at the current moment, obtain the text coefficient of the information verification field at the current moment.
[0046] In order to accurately verify and analyze the synthesized information during the user interactive Q&A process, it is necessary to guide the iterative update process of the information verification field during time series data prediction based on the key information, key content, and keywords of the interactive Q&A context information. To prevent redundant information and the text information in the Q&A process from affecting the user's willingness to purchase goods and at the same time affecting the accuracy of the user's data prediction and analysis, when adaptively determining the data window size during data prediction, adding the context analysis result of the current text data can make the data prediction result more accurate.
[0047] In this embodiment, as Figure 2 shown, the method for obtaining the text coefficient of the information verification field at the current moment can be implemented by steps S201 to S203.
[0048] Step S201, extract keywords from the text data of each interactive Q&A at the current moment respectively, and obtain the word vector of each keyword.
[0049] At the current moment, there may be multiple users performing interactive Q&A operations simultaneously, corresponding to multiple text data. It is necessary to extract features from each text data respectively. In this embodiment, taking any one text data as an example for illustration, in the context text information of the user Q&A, there may be specific text patterns, such as product keywords, product sales-related information, detailed information introductions of product attributes, uses, etc. Among them, for example, "The sales volume of this product increased by 30% last quarter" or "We sold more than 500 units in the last month", "In the same category of products, our market share has been growing steadily", and so on. It is necessary to extract features of the key information in the text information.
[0050] Specifically, for keyword extraction from text data, in this embodiment, natural language processing technology (NLP) is used to obtain keywords, and then a word embedding model is used to obtain the word vector of each keyword, such as Word2Vec, GloVe, etc.
[0051] In this embodiment, as a specific example, regular expressions can be used to identify text information of specific patterns, such as product item codes, quantity data related to market sales of products, etc. TF-IDF (term frequency-inverse document frequency) and other technologies can also be used to obtain keywords in text data. Named entity recognition (NER) technology can also be used to label entity names in text, such as numbers, dates, etc.
[0052] Step S202: For any text data of an interactive Q&A, based on the data similarity feature between the word vectors of adjacent keywords in the text data and the distribution of the amount of text data between adjacent keywords, obtain the information verification ratio of the text data.
[0053] The verification domain of text information can be understood as that in the process of text information analysis, in order to prevent the influence of redundant information on the efficiency and accuracy of logical relationship judgment and the accuracy of data prediction, it is necessary to overcome this influencing factor by setting the main information window. Furthermore, for the size of the information window, the analysis results of the context information features of the text data can be added to provide a reference for the analysis range of the information verification domain, and the analysis range size of the verification domain with better prediction effect can be adaptively obtained.
[0054] There is a certain correlation relationship and similarity feature between the size of the verification domain of text information and the change relationship between the word vectors represented by the keywords in the text data. For example, the more similar or closer the sales situation of market commodities at the current time is, the larger the information verification domain needs to be obtained. The smaller the similarity between the key information in the text information during the current-time interactive Q&A process, the more the key information represents different concepts. At this time, the similarity of the sales situation of the sales information of market commodities is smaller, and the corresponding market uncertainty is greater. In order to improve the interactive accuracy of the model, a guiding analysis of algorithm prediction is carried out for the extracted context information in the user interactive Q&A process.
[0055] In this embodiment, taking a text data of any user interactive Q&A as an example for illustration, based on the similarity between the word vectors of every two adjacent keywords in the text data, determine the similarity information factor between every two adjacent keywords; based on the amount of data between the position distributions of every two adjacent keywords in the text data, determine the distance information factor between every two adjacent keywords; fuse the similarity information factors and distance information factors between all two adjacent keywords in the text data to obtain the information verification ratio of the text data, and both the similarity information factor and the distance information factor are positively correlated with the information verification ratio.
[0056] Among them, take the cosine similarity between the word vectors of every two adjacent keywords as the similarity information factor between every two adjacent keywords. In other embodiments, the implementer can adopt other appropriate methods to calculate the similarity feature between two word vectors, such as the Pearson correlation coefficient, or the negative correlation coefficient of the DTW distance, etc. The positive correlation relationship can be a multiplicative relationship, or an additive relationship, etc.
[0057] Then, the Euclidean distance of the text between every two adjacent keywords in the text data is used as the distance information factor between every two adjacent keywords, which is used to characterize the amount of information distribution between every two adjacent keywords in the text data. For example, assume that in a text data, the amount of text between the first keyword and the second keyword is 50, then the distance information factor between these two keywords is 50. In other embodiments, the Euclidean distance between the word vectors of two adjacent keywords can also be calculated to characterize the distance information factor.
[0058] In this embodiment, there are many adjacent pairs of keywords in a text data, and there is a similarity information factor and a distance information factor corresponding to each pair. Then, by multiplying the two aspects of the feature distributions of the adjacent keywords, a product corresponding to each pair of adjacent keywords can be obtained. Finally, the mean value of the products corresponding to all pairs of adjacent keywords in the text data is used as the information verification ratio of the text data, which characterizes the overall level of the feature performance of the adjacent keywords in the text data in two aspects.
[0059] As a specific example, taking any text data as an example for illustration, the information verification ratio of the i-th text data can be expressed by the formula: , where represents the information verification ratio of the i-th text data, represents the number of keywords in the i-th text data, represents the similarity information factor between the n-th keyword and the (n + 1)-th keyword in the i-th text data, represents the distance information factor between the n-th keyword and the (n + 1)-th keyword in the i-th text data, represents the word vector of the n-th keyword, represents the word vector of the (n + 1)-th keyword.
[0060] represents the cosine similarity between the word vectors of two adjacent keywords, which quantitatively expresses the similarity of the content represented by the word vectors of two adjacent keywords. The more similar the represented content is, the larger the corresponding range of the information verification domain is, and the larger the value of the corresponding information verification ratio is. This is because the word vectors with larger similarity information factors have more similar word information. For example, the marketing-related data is more similar, that is, the sales situation of the commodity market change information is more similar, then this data is more necessary to be used as the verification data for subsequent prediction analysis, and thus the proportion of the range size of the information verification domain calculated is higher, that is, the value of the information verification ratio is larger.
[0061] It reflects the amount of information distribution between two adjacent keywords in the text data. The text distance between keywords is used as the basic size of the information verification domain. Then, combined with the similar information distribution between keywords as the weight, the basic size is weighted. That is, in other regions, due to the non-existence or small amount of information, the necessity of logical analysis for other regions is lower, that is, the value of the corresponding information verification ratio is larger. Then, by comprehensively considering the overall distribution level of the text data, the proportion of the current text data to the size of the information verification domain can be obtained.
[0062] Step S203: Based on the overall level of the information verification ratio of the text data of each interactive question and answer at the current moment, determine the text coefficient of the information verification domain at the current moment.
[0063] According to the same method as in step S202, the information verification ratio of each text data at the current moment can be obtained, which reflects the proportion of each text to the size of the information verification domain. Then, in this embodiment, the average value of the information verification ratios of all text data at the current moment is used as the text coefficient of the information verification domain at the current moment. That is, the average value is used to reflect the overall level of the information verification ratio at the current moment. In other embodiments, the median, mode, etc. can also be used to reflect the overall level of the information verification ratios of all text data at the current moment.
[0064] Furthermore, the text coefficient of the information verification domain at the current moment represents the weight coefficient for similarity feature analysis from the aspect of text information. That is, the larger the value of the text coefficient, the higher the proportion when calculating the window size corresponding to the information verification domain, and the greater the necessity of predictive analysis for the current data.
[0065] Step S300: Combine the interactive evaluation data in the historical data to analyze the feature distribution of the interactive evaluation data corresponding to all users at the current moment, and obtain the evaluation coefficient of the information verification domain at the current moment; combine the text coefficient and the evaluation coefficient to determine the window size of the information verification domain at the current moment.
[0066] When extracting key information from user Q&A data in this embodiment, a corresponding text verification field and the prediction results of the script text information features are added. The text information verification field aims to improve the model response efficiency when extracting keywords and key data information, and the prediction results aim to fit the user's needs and combine with the text information to perform data prediction, making the prediction results more in line with the user's needs. Based on this, in order to prevent prediction errors caused by the randomness of the sales situation of commodity market data, unreasonable allocation of the text information verification field, and low information reference value of the current model Q&A, a user evaluation feedback mechanism can be introduced into the model. On the one hand, it increases the interaction between the model and the user, and on the other hand, it also increases the user's evaluation feedback on the model, enabling the predicted data to better grasp the user's real usage experience, and thus the window size of the verification field adaptively determined can be more in line with the user's needs.
[0067] Based on this, as Figure 3 shown, the method for obtaining the window size of the information verification field at the current moment can be implemented by steps S301 to S303.
[0068] First, it is necessary to combine the historical user Q&A information and the user's evaluation feedback results on the Q&A to analyze whether the current Q&A strategy of the model meets the user's needs, so as to determine the weight coefficient of the user Q&A feedback aspect during data prediction. That is, by analyzing the feature distribution of the interaction evaluation data corresponding to all users at the current moment in the historical data, the evaluation coefficient of the information verification field at the current moment is obtained. The specific implementation steps include step S301 and step S302.
[0069] Step S301, based on the negative correlation coefficient of the interaction evaluation data corresponding to each user at the current moment, determine the Q&A feature factor of each user; obtain the Q&A feature factor of each user at a preset number of historical moments before the current moment.
[0070] By analyzing the scoring results corresponding to different user Q&A processes at the current moment, the necessity of user feedback iteration at the current moment is quantified. That is, the lower the score, the higher the necessity of user iteration, indicating that the model's answer result this time is more deviated from the real result, the lower the user's satisfaction, that is, the lower the accuracy of the model's corresponding recommendation result, and the more the model needs to be updated and iterated. Therefore, there is a negative correlation between the user's evaluation result of the model and the Q&A feature factor. Among them, the negative correlation can be characterized in the form of the reciprocal, or in the form of the negative exponential power with the natural constant e as the base, etc.
[0071] In this embodiment, when the user evaluates each Q&A process, the value of the corresponding interactive evaluation data is an integer from 0 to 10. Furthermore, by calculating the difference distance between each interactive evaluation data and 10, the negative correlation coefficient of the interactive evaluation data can be obtained, and it is determined as the Q&A characteristic factor corresponding to the user of the interactive evaluation data, which can reflect the necessity of updating and iterating the model. Specifically, it is expressed as , represents the Q&A characteristic factor of the m-th user, represents the interactive evaluation data corresponding to the m-th user at the current moment.
[0072] The Q&A characteristic factor characterizes the necessity degree of updating and iterating the model of the Q&A process corresponding to the user. The smaller the value of the user's interactive evaluation data, the lower the satisfaction degree of the user with the current Q&A process, and the larger the value of the corresponding Q&A characteristic factor, the greater the necessity degree of updating and iterating the current model. In other embodiments, the reciprocal of the interactive evaluation data can also be used as the Q&A characteristic factor.
[0073] According to the same method, for the Q&A processes in the historical data, that is, the interactive evaluation data corresponding to each user's Q&A process in the historical data, the corresponding Q&A characteristic factors can also be obtained. In order to improve the accuracy reference of the user evaluation feedback characteristics in the model, this embodiment uses the historical data corresponding to a preset number of historical moments between the current moment to jointly characterize the necessity degree of the update and iteration adjustment of the model at the current moment. Among them, the value of the preset number is 30, and the implementer can set it according to the specific implementation scenario.
[0074] Step S302: Obtain the evaluation coefficient of the information verification domain at the current moment according to the characteristic distribution of the Q&A characteristic factors of all users at the current moment and the characteristic distribution of the Q&A characteristic factors of all users at all historical moments.
[0075] The Q&A factors of each user at the current moment and historical moments respectively reflect the user satisfaction degree of the Q&A processes corresponding to the current moment and historical moments, and at the same time reflect the necessity degree of model adjustment at the corresponding moments. Furthermore, by combining the performance characteristics of the necessity degrees at the historical moment and the current moment, the proportion characteristic degree of the size of the information verification domain at the current moment can be quantified.
[0076] Specifically, based on the mean of the Q&A characteristic factors of all users at the current moment and all historical moments and the mean of the Q&A characteristic factors of all users at the current moment, the evaluation coefficient of the information verification domain at the current moment is determined. In this embodiment, as a specific example, the calculation method of the evaluation coefficient can be expressed as: , where is the evaluation coefficient of the information verification domain at the current moment, represents the mean of all Q&A feature factors of all users at the current moment, represents the mean of all Q&A feature factors of all users at the current moment and all historical moments, and Norm represents the normalization function.
[0077] reflects the overall distribution level of the user evaluation features in the historical data, quantitatively characterizes the necessity of adjusting the model feedback at the current moment, and then uses the normalized as the weight of the Q&A feature factor at the current moment. The greater the weight, the greater the Q&A feature factor at the current moment, and the higher the corresponding feedback update necessity. The higher the update necessity, the larger the corresponding window size should be, aiming to increase the accuracy of the model response by increasing the range of the information verification domain and improve the accuracy of data prediction and marketing suggestions. Among them, the normalization method is a well-known technology and will not be introduced in detail here.
[0078] Step S303: Determine the window size of the information verification domain at the current moment by combining the text coefficient and the evaluation coefficient.
[0079] The text coefficient of the information verification domain at the current moment characterizes the proportion of the size of the information verification range from the aspect of the similarity feature distribution of the text information in the user Q&A process. The evaluation coefficient of the information verification domain at the current moment characterizes the proportion of the size of the information verification range from the aspect of the feedback evaluation result of the user Q&A. Therefore, by combining the feature distribution situations of these two aspects, the size of the range for data prediction and verification at the current moment can be adaptively determined, which can effectively improve the accuracy of data response, fully combine the information distribution characteristics of the actual user Q&A process, and improve the accuracy of the prediction result and marketing suggestions.
[0080] Specifically, fuse the text coefficient and the evaluation coefficient of the information verification domain at the current moment to determine the adjustment coefficient, and the value range of the adjustment coefficient is (0, 2); use the adjustment coefficient to adjust the preset initial size of the text data information verification domain to obtain the window size of the information verification domain at the current moment.
[0081] In this embodiment, first calculate the product of the text coefficient and the evaluation coefficient of the information verification domain at the current moment for feature fusion, and then map the value range of the product result of the feature fusion to (0, 2) in the form of a linear function to obtain the adjustment coefficient, and then the window size of the information verification domain can be adjusted by using the adjustment coefficient. Specifically, the adjustment coefficient is expressed as , is the evaluation coefficient, is the text coefficient, represents the adjustment coefficient, and Norm is the normalization function.
[0082] The larger the value of the text coefficient, the greater the weight ratio of the similarity feature analysis in the text information at the current moment, which further indicates that the proportion in calculating the window size corresponding to the information verification field is higher, and the greater the necessity of predicting and analyzing the current data. The larger the value of the evaluation coefficient, the worse the result of the user's question-and-answer feedback at the current moment, that is, the lower the user satisfaction of the model's question-and-answer reply, correspondingly indicating a lower possibility of data accuracy, and thus the greater the necessity of predicting and adjusting the current moment, and the larger the value of the corresponding window range.
[0083] It should be noted that the implementer can set the initial window size according to the specific implementation scenario, such as 30. In this embodiment, the product of the adjustment coefficient and the initial window size is rounded down to obtain the window size of the information verification field at the adjusted current moment. The window size can be understood as the data selection range corresponding to the information verification field at the current moment.
[0084] Step S400, the window size of the information verification field is used to set the time window size in the time series prediction model, and the evaluation coefficient of the information verification field is used to set the regression coefficient in the time series prediction model; the time series prediction model is used to obtain the prediction result of the market sales data.
[0085] In order to improve the model interaction quality, this embodiment selects to analyze the context text information of the user's question and answer, integrates its corresponding logic, adds a user feedback interface, and updates the model interaction quality parameters in real time according to the user feedback information to achieve the purpose of information verification. Furthermore, in order to provide a more reference-worthy marketing strategy, this embodiment adaptively obtains the information verification range by combining the text information of the user's question and answer and the evaluation feedback of the user's question and answer, so as to obtain reference data for data prediction, make the data prediction result more accurate, and finally determine a more reference-worthy and better-effective marketing strategy.
[0086] The market sales data obtained in this embodiment has timeliness, and at the same time, the window size of the information verification field at the current moment is adaptively obtained. Therefore, the market sales data in the historical data corresponding to the window size can be obtained before the current moment as the data set for the prediction process of the market sales data at the current moment, and combined with the evaluation coefficient, the influence degree of time on the market sales data can be analyzed to obtain the corresponding prediction result.
[0087] Specifically, the regression coefficient of linear prediction is determined based on the evaluation coefficient, and based on the market sales data within the window corresponding to the current moment under the window size, the time series prediction model is used to predict the market sales data to obtain the prediction result.
[0088] In this embodiment, the ARIMA time series prediction model is used for the prediction operation of time series data. The evaluation coefficient of the information verification field at the current moment is used as the regression coefficient of the prediction model, that is, the evaluation feedback result of the user question-and-answer process is used to affect the prediction result of the current market sales. For example, the higher the user's evaluation of the current question-and-answer process, the more satisfied the user is with the service provided by the model, and thus the higher the user's desire to purchase the current product or the higher the user's attention to the current product. On the contrary, the lower the user's evaluation of the current question-and-answer process, the lower the user's satisfaction with the current model's question-and-answer, and thus the lower the user's desire to purchase the current product. Therefore, the user's evaluation feedback also affects a part of the future market sales situation.
[0089] It should be noted that the role of the window size in the data prediction operation is that the window size is used to determine the range of the data set during data prediction. For example, if the window size is 30, then the market sales data in the historical data of the 30 moments before the current moment is selected as the data set for data prediction.
[0090] In this embodiment, while adaptively adjusting the size of the data set for the predicted data, the regression coefficient of the prediction process is adjusted. During data prediction, the text features of the question-and-answer information are ensured, and at the same time, the evaluation feedback of the user question-and-answer is combined to affect the prediction result of the market sales, so that the data prediction result can better fit the user's real evaluation, and the purpose of adjusting the model parameters based on the user's evaluation feedback can be achieved, and a better marketing strategy can be obtained.
[0091] Finally, the marketing strategy can be determined through the prediction result. In the prediction result, when the predicted market sales data for the next moment increases, the user can invest in the current product. When the predicted market sales data for the next moment decreases, the user can refrain from investing in the current product. It should be noted that in other embodiments, after obtaining the prediction result, the relevant investment manager can analyze the prediction trend through more professional and specific methods and give the user a more professional investment strategy.
[0092] In summary, during the model interaction analysis process, because some data sources change randomly and frequently, and the data redundancy degree is relatively high, it is particularly important to select an appropriate range size to predict the market sales data and the corresponding marketing strategy. The embodiment of the present invention comprehensively considers the context feedback information stage in the interactive question-and-answer process, integrates the text data features, adds the evaluation feedback of the question-and-answer interaction, prevents the uncertainty of the sales market, improves the accuracy of the predicted data, obtains a more accurate question-and-answer interaction result, and combines the user feedback information to perform iterative updates of the prediction parameters and the verification field, improving the interaction accuracy of the model, so that a better marketing strategy can be obtained.
[0093] As shown Figure 4 in the figure, a system for predicting using a time series model is provided. The system includes:
[0094] A data acquisition module, configured to obtain market sales data at the current moment, interaction evaluation data of each user for the interaction and response process at the current moment, and text data of each interaction and response during the interaction and response process of the language model user;
[0095] A question and answer analysis module, configured to obtain a text coefficient of the information verification field at the current moment according to the data similarity feature distribution and text data volume distribution between adjacent key information in the text data of each interaction and response at the current moment;
[0096] A window analysis module, configured to analyze the feature distribution of the interaction evaluation data corresponding to all users at the current moment in combination with the interaction evaluation data in the historical data, and obtain an evaluation coefficient of the information verification field at the current moment; determine the window size of the information verification field at the current moment by combining the text coefficient and the evaluation coefficient;
[0097] A prediction analysis module, the window size of the information verification field is used to set the time window size in the time series prediction model, and the evaluation coefficient of the information verification field is used to set the regression coefficient in the time series prediction model; the time series prediction model is used to obtain the prediction result of the market sales data.
[0098] For the system provided in the above embodiment, only the above-mentioned division of each functional module is used as an example for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, a system for predicting using a time series model and a method for predicting using a time series model provided in the above embodiment belong to the same inventive concept. The specific implementation process can be seen in the method embodiment and will not be elaborated here.
[0099] Based on the same inventive concept as the above method, this embodiment also provides a device for predicting using a time series model. The device includes a memory and a processor, where: the memory is used to store program codes; the processor is used to read the program codes stored in the memory and execute the steps of a method for predicting using a time series model.
[0100] Based on the same inventive concept as the above method, this embodiment also provides a computer-readable storage medium, on which a computer program is stored; the computer program is executed by a processor to implement the steps of a method for predicting using a time series model.
[0101] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application 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 on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.
Claims
1. A method for prediction using a time series model, characterized in that, The method includes the following steps: During the interactive Q&A process of the language model user, obtain the market sales data at the current moment, the interactive evaluation data of each user on the interactive Q&A process at the current moment, and the text data of each interactive Q&A. According to the data similarity feature distribution between adjacent key information in the text data of each interactive Q&A at the current moment and the distribution of the text data volume, obtain the text coefficient of the information verification domain at the current moment. Combine the interactive evaluation data analysis in the historical data to obtain the feature distribution of the corresponding interactive evaluation data of all users at the current moment, and obtain the evaluation coefficient of the information verification domain at the current moment; combine the text coefficient and the evaluation coefficient to determine the window size of the information verification domain at the current moment. The window size of the information verification domain is used to set the time window size in the time series prediction model, and the evaluation coefficient of the information verification domain is used to set the regression coefficient in the time series prediction model; the time series prediction model is used to obtain the prediction result of the market sales data. The combining the interactive evaluation data analysis in the historical data to obtain the feature distribution of the corresponding interactive evaluation data of all users at the current moment, and obtaining the evaluation coefficient of the information verification domain at the current moment specifically includes: Based on the negative correlation coefficient of the interactive evaluation data corresponding to each user at the current moment, determine the Q&A feature factor of each user; obtain the Q&A feature factor of each user at a preset number of historical moments before the current moment. According to the feature distribution of the Q&A feature factors of all users at the current moment and the feature distribution of the Q&A feature factors of all users at all historical moments, obtain the evaluation coefficient of the information verification domain at the current moment. The according to the feature distribution of the Q&A feature factors of all users at the current moment and the feature distribution of the Q&A feature factors of all users at all historical moments, obtaining the evaluation coefficient of the information verification domain at the current moment specifically includes: Based on the mean value of the Q&A feature factors of all users at the current moment and all historical moments and the mean value of the Q&A feature factors of all users at the current moment, determine the evaluation coefficient of the information verification domain at the current moment. The combining the text coefficient and the evaluation coefficient to determine the window size of the information verification domain at the current moment specifically includes: Fuse the text coefficient and the evaluation coefficient of the information verification domain at the current moment to determine the adjustment coefficient, and the value range of the adjustment coefficient is (0, 2); use the adjustment coefficient to adjust the preset initial size of the text data information verification domain to obtain the window size of the information verification domain at the current moment.
2. The method for prediction using a time series model according to claim 1, characterized in that The according to the data similarity feature distribution between adjacent key information in the text data of each interactive Q&A at the current moment and the distribution of the text data volume, obtaining the text coefficient of the information verification domain at the current moment specifically includes: Extract keywords from the text data of each interactive Q&A at the current moment respectively, and obtain the word vectors of each keyword. For any text data of interactive Q&A, according to the data similarity characteristics between the word vectors of adjacent keywords in the text data and the distribution of the amount of text data between adjacent keywords, obtain the information verification ratio of the text data; Based on the overall level of the information verification ratio of the text data of each interactive Q&A at the current moment, determine the text coefficient of the information verification domain at the current moment.
3. The method for prediction using a time series model according to claim 2, wherein The obtaining of the information verification ratio of the text data according to the data similarity characteristics between the word vectors of adjacent keywords in the text data and the distribution of the amount of text data between adjacent keywords specifically includes: Based on the similarity between the word vectors of every two adjacent keywords in the text data, determine the similarity information factor between every two adjacent keywords; based on the amount of data between the position distributions of every two adjacent keywords in the text data, determine the distance information factor between every two adjacent keywords; Fuse the similarity information factors and distance information factors between all two adjacent keywords in the text data to obtain the information verification ratio of the text data, and both the similarity information factor and the distance information factor are positively correlated with the information verification ratio.
4. A method for prediction using a time series model according to claim 1, characterized in that The market sales data at the current moment includes the sales volume of commodities in the market at the current moment; the interactive evaluation data includes the evaluation scores of each user for the interactive Q&A process.
5. A device for prediction using a time series model, characterized in that, The device includes a memory and a processor, wherein: The memory is used to store program codes; The processor is used to read the program codes stored in the memory and execute a method for prediction using a time series model as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, A computer program is stored thereon; the computer program is executed by the processor to implement a method for prediction using a time series model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
New product demand prediction method
CN111178624A
Big data-based sales information prediction method and device
CN116596582A